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

Cannot read previously reported tuple when using file backend #214

Open
donaldcampbelljr opened this issue Jan 31, 2025 · 0 comments
Open

Comments

@donaldcampbelljr
Copy link
Contributor

If you report a tuple to a file backend and then try to re-use that same results file (to report more results), pipestat will fail (well, the yaml constructor.py library throws an error) during the loading of the result files:

yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/tuple'
  in "<unicode string>", line 8, column 17:
          bed_type: !!python/tuple

How my data appears (it is human readable, I would think it should be machine readable):

default_pipeline_name:
  project: {}
  sample:
    95900d67ed6411a322af35098e445eb0:
      meta:
        pipestat_modified_time: '2025-01-31 12:52:29'
        pipestat_created_time: '2025-01-31 12:52:29'
      bed_type: !!python/tuple
      - bed6+4
      - narrowpeak
    936c62bee58d048eff754c7c189e3d8f:
      meta:
        pipestat_modified_time: '2025-01-31 12:52:29'
        pipestat_created_time: '2025-01-31 12:52:29'
      bed_type: !!python/tuple
      - bed6+4
      - narrowpeak

Obviously, a workaround would be to simply take the values from the tuple and place them in some other form,e.g. two separate strings or a list.

However, I wanted this reporting to be as simple and convenient as possible.

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

No branches or pull requests

1 participant