Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing date formatting #8

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

fixing date formatting #8

wants to merge 1 commit into from

Conversation

buehlere
Copy link
Collaborator

The date formatting was breaking Voyager's cwlpack command. This resulted in the pipeline failing to submit to ridgeback.

example failed pack:

{
                                    "class": "s:Person",
                                    "s:email": "mailto:[email protected]",
                                    "s:identifier": "",
                                    "s:name": "Ronak Shah"
                                }
                            ],
                            "s:dateCreated": Traceback (most recent call last):
  File "/usr/local/bin/cwlpack", line 8, in <module>
    sys.exit(localpack())
  File "/usr/local/lib/python3.9/dist-packages/sbpack/pack.py", line 426, in localpack
    _localpack(sys.argv[1:])
  File "/usr/local/lib/python3.9/dist-packages/sbpack/pack.py", line 458, in _localpack
    json.dump(cwl, sys.stdout, indent=4)
  File "/usr/lib/python3.9/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/lib/python3.9/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.9/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.9/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.9/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/usr/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type date is not JSON serializable

You can check a failing cwlpack on Voyager with:

module load singularity/3.3.0
source env_beagle.sh
singularity shell instance://dev_beagle
cwlpack /tmp/4591528e-babc-4db8-a252-88eed547575a/chip-var/chip-var.cwl --json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant