pepkit / pepdbagent

Database for storing sample metadata
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Error in digest creation #52

Closed khoroshevskyi closed 1 year ago

khoroshevskyi commented 1 year ago

Error message:

Namespace = geo_recent ; Project_name = GSE217424 ; Tag = raw
Traceback (most recent call last):
  File "/home/runner/work/geo_***/geo_***/geo_pipeline_script.py", line 134, in <module>
    sys.exit(main())
  File "/home/runner/work/geo_***/geo_***/geo_pipeline_script.py", line 122, in main
    upload_geo_projects(
  File "/home/runner/work/geo_***/geo_***/geo_pipeline_script.py", line 54, in upload_geo_projects
    pep_db_connection.upload_project(
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pepdbagent/pepdbagent.py", line 122, in upload_project
    proj_digest = self._create_digest(proj_dict)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pepdbagent/pepdbagent.py", line 712, in _create_digest
    json.dumps(
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
ValueError: Out of range float values are not JSON compliant
Error: Process completed with exit code 1.

This problem happens after getting projects using Geofetcher().get_projects(). Getting project by Geofetcher().fetch_all() and importing project from file doesn't have this error

khoroshevskyi commented 1 year ago

Error is in Geofetch. Projects are not the same --> this error is related to peppy. 2 Possible reasons: 1) Pandas df can be created incorrectly 2) Incorrectly imported in peppy

Correct (usual Project import) image

Incorrect (Project import from pandas): image