-
Notifications
You must be signed in to change notification settings - Fork 2
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
New error from make_table.py #64
Comments
It seems it fails when it encounters the second ID, e.g. in a results file
it fails on the last line. However, if I provide a file with just 17002, it works fine, so it is not this ID per se. Most curious! |
I could get around the problem with the column list not having scalar elements by casting them to strings. This works, as we only print the table to a text file afterwards, but it not entirely kosher:
|
Hi Magnus, I see you resolved the issue but I'm still curious how it happened. I cannot recreate it with the example you shared, could you maybe drop me the complete file so I can investigate? Thanks. |
I think it depends on the version of SCOPE - the version I installed on September 9, 2021, works fine (except the other issue with the new ChEBIs that do not have IDF numbers). The current version does not work. I am testing with Python 3.11.5 and Pandas 2.0.3, but I have also tried later versions of both with the same error. There are quite a few differences between these, many related to the TFIDF normalization. But the new (non-working) version also specifies the data types when reading in the dataframe, which the old (working) version did not. Perhaps this has something to do with it? |
I tested make_table with the HILIC and APCI results with python=3.11.5 and pandas >2 and it worked. Do those results also give an error for you? |
Yes, with the current SCOPE, Python 3.11.5 and Pandas 2.0.3, I get the following error on the included APCI results file:
|
I'm so confused why I can't reproduce this error (python 3.11.5 and pandas 2.0.3). Could you try creating a new conda environment with python=3.11.5 and pip install pandas=2.0.3 and see if it fails the same way? |
I created new conda environments with Python 3.8, 3.11 and 3.12, activating the environment and running |
I think we can defintely exclude that it is software related. I'm reading back your comments and you said that it failed on key "Class", which ChEBI2Class file do you have? For me it's "ChEBI2Class_rel212.pkl" |
Yes, same version, downloaded today with download_files.py. For a while, I thought it was the occurrence of new ChEBI identifiers, but these are not present in the APCI and HILIC example results. I agree it must be something in the execution environment. This is what I did:
|
Can you add a line to the make_table script where you print the key and the column list, and report the ones that make it fail? |
I can read and print the entire column_list, and it looks right. It is the assignment |
I can add that I also tried three different computers (my personal laptop, LUMC laptop and LUMC workstation), with different Python environments. As soon as I update these (or download Python/Pandas again), I get the error above. Python complains about column_list not containing scalar values (which it should, as far as I understand how it is constructed). Converting all the elements to strings did solve the problem, but they should have been strings all along, right? Anyway, many thanks for looking into this! |
I am getting the following error, in make_table.py, which I think are new. I am now running Python 3.11.5 packaged by Anaconda. I have used this environment in the past, and it has worked.
The text was updated successfully, but these errors were encountered: