Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • W Wellbore DDMS Data Loader
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe SoftwareOpen Subsurface Data Universe Software
  • OSDU Community Utilities
  • Data Loading
  • Wellbore DDMS Data Loader
  • Issues
  • #25
Closed
Open
Issue created Oct 20, 2021 by Chad Leong@chadOwner

TypeError: Object of type WellboreRecord is not JSON serializable

After ingesting a LAS file with python -m lascli ingest wellbore

I try to list it with python -m lascli list wellbore.

I got the following error:

Getting wellbore ID opendes:master-data--Wellbore:4e34b3136c4d4b09b6609b969c59e9db
Object of type WellboreRecord is not JSON serializable
Traceback (most recent call last):
  File "C:\Users\cleong4\OneDrive - Schlumberger\OSDU\wellbore-ddms-las-loader\env39\lib\site-packages\knack\cli.py", line 231, in invoke        
    cmd_result = self.invocation.execute(args)
  File "C:\Users\cleong4\OneDrive - Schlumberger\OSDU\wellbore-ddms-las-loader\env39\lib\site-packages\knack\invocation.py", line 223, in execute
    cmd_result = parsed_args.func(params)
  File "C:\Users\cleong4\OneDrive - Schlumberger\OSDU\wellbore-ddms-las-loader\env39\lib\site-packages\knack\commands.py", line 146, in __call__ 
    return self.handler(*args, **kwargs)
  File "C:\Users\cleong4\OneDrive - Schlumberger\OSDU\wellbore-ddms-las-loader\env39\lib\site-packages\knack\commands.py", line 253, in _command_handler
    result = op(client, **command_args) if client else op(**command_args)
  File "C:\Users\cleong4\OneDrive - Schlumberger\OSDU\wellbore-ddms-las-loader\src\lasloader\commands\list_osdu.py", line 27, in wellbore
    print(json.dumps(wellbore, indent=4, sort_keys=True))
  File "C:\Python39\lib\json\__init__.py", line 234, in dumps
    return cls(
  File "C:\Python39\lib\json\encoder.py", line 201, in encode
    chunks = list(chunks)
  File "C:\Python39\lib\json\encoder.py", line 438, in _iterencode
    o = _default(o)
  File "C:\Python39\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type WellboreRecord is not JSON serializable
Assignee
Assign to
Time tracking