pepkit / eido

Validator for PEP objects
http://eido.databio.org
BSD 2-Clause "Simplified" License
5 stars 5 forks source link

Cryptic error message when converting to csv #75

Closed Redmar-van-den-Berg closed 1 month ago

Redmar-van-den-Berg commented 2 months ago

Whey I try to convert a PEP project to csv using eido, I get the following error. Is there a way to figure out what is going wrong here, I have no idea what could be wrong. As far as I can tell, there is nothing out of the ordinary about this project.

eido convert project_config.yml --format csv
Traceback (most recent call last):
  File "micromamba/envs/PEP/bin/eido", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "micromamba/envs/PEP/lib/python3.12/site-packages/eido/cli.py", line 92, in main
    p = Project(args.pep, sample_table_index=args.st_index)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "micromamba/envs/PEP/lib/python3.12/site-packages/peppy/project.py", line 163, in __init__
    self.create_samples(modify=False if self[SAMPLE_TABLE_FILE_KEY] else True)
  File "micromamba/envs/PEP/lib/python3.12/site-packages/peppy/project.py", line 277, in create_samples
    self.modify_samples()
  File "micromamba/envs/PEP/lib/python3.12/site-packages/peppy/project.py", line 462, in modify_samples
    self.attr_imply()
  File "micromamba/envs/PEP/lib/python3.12/site-packages/peppy/project.py", line 818, in attr_imply
    if sample_val not in implier_val:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nsheff commented 2 months ago

@khoroshevskyi can you look into this?

nsheff commented 2 months ago

@Redmar-van-den-Berg is there any way you can share the PEP?

Can you put the PEP on PEPhub?

khoroshevskyi commented 2 months ago

@Redmar-van-den-Berg, As Nathan mentioned, could you provide provide sample PEP, because unfortunately, I can't reproduce this error

nsheff commented 2 months ago

@khoroshevskyi it looks like the problem is in:

if sample_val not in implier_val:

can you try maybe making an example table with an implied attribute, but where a particular sample has a value that is not in the set of "if" values for the implied attribute?

Maybe we don't have a good error message capturing this annotation error.

khoroshevskyi commented 2 months ago

I already did it, and I haven't found any issues. Also, try to update eido to newer version, it seems that it is old peppy, and eido, and this issue could be solved in previous release

nsheff commented 2 months ago

@Redmar-van-den-Berg can you let us know what version you're using, and try updating to the latest version?

Redmar-van-den-Berg commented 1 month ago

I wasn't able to determine exactly what was wrong with the PEP project, but I no longer get this error after upgrading to eido 0.2.4.