ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
203 stars 131 forks source link

🐛 Bug: Error encountered 'ersilia -v api calculate eos3b5e' #327

Closed paulinebanye closed 1 year ago

paulinebanye commented 1 year ago

Describe the bug.

Hi @GemmaTuron , I encountered a type error whilst attempting to calculate the molecular weight of the model eos3b5e.

TypeError: No registered converter was able to produce a C++ rvalue of type std::basic_string<wchar_t, std::char_traits, std::allocator > from this Python object of type NoneType

Describe the steps to reproduce the behavior

Operating System - windows 10, Ubuntu 20.04.

Steps taken

Expected behavior.

Molecular weight of the model should be calculated successfully

Screenshots.

error

Operating environment

Ubuntu 20.04

Additional context

No response

Malikbadmus commented 1 year ago

Hello @pauline-banye, check your api key, most of the models make use of api 'predict'.

But from your screenshot, I can see that you're testing the dummy model @GemmaTuron assigned to us.

Your command is missing -i element, and you should replace the model name with the single molecule "CCCCC".

ersilia -v api calculate -i "CCCCCC"

GemmaTuron commented 1 year ago

Thanks @Malikbadmus

Indeed @pauline-banye the problem here seems that you are not giving the input: ersilia -v api calculate -i "CCCCCC"

The -i flag refers to the input (what we will calculate the molecular weight of), "CCCC" is a simple molecule of only 4 Carbons

paulinebanye commented 1 year ago

Thanks @Malikbadmus @GemmaTuron. Trying it out now

DhanshreeA commented 1 year ago

@GemmaTuron Maybe we can make the error prompts or the stack trace more intuitive for these kinds of errors? I believe this could be handled upfront in the code for parsing arguments to the ersilia command.

GemmaTuron commented 1 year ago

Hi @DhanshreeA indeed, improving the error prompts of Ersilia is one of the tasks we need to work on. I'll think over the weekend how we can tackle this collaboratively !

Zainab-ik commented 1 year ago

@pauline-banye try checking your error log if it states Isaura data lakes are not installed and reinstall it in your ersilia environment. I came across a similar error also while running ersilia -v api calculate -i "eml_canonical.csv" -o "eos3b5e.csv" > my.log 2>&1 check log here my.log It's yet to be resolved though. @GemmaTuron any suggestion for the error?

Zainab-ik commented 1 year ago

@pauline-banye try checking your error log if it states Isaura data lakes are not installed and reinstall it in your ersilia environment. I came across a similar error also while running ersilia -v api calculate -i "eml_canonical.csv" -o "eos3b5e.csv" > my.log 2>&1 check log here my.log It's yet to be resolved though. @GemmaTuron any suggestion for the error?

I've resolved the type error in the log above, realized my input_csv was named wrongly and I adjusted the file path also. Now I have eos3b5e.csv. @pauline-banye You can also try it.

GemmaTuron commented 1 year ago

Hi @Zainab-ik if isaura is not installed it is not a proble to run ersilia, in principle they are two independent modules and it is a "nice to have" but not a hard requirement. @pauline-banye please provide an update if you have revised your input and output files and got a log file also.

Zainab-ik commented 1 year ago

Hi @Zainab-ik if isaura is not installed it is not a proble to run ersilia, in principle they are two independent modules and it is a "nice to have" but not a hard requirement. @pauline-banye please provide an update if you have revised your input and output files and got a log file also.

Noted @GemmaTuron

paulinebanye commented 1 year ago

Hi everyone, please excuse my delayed response. I'm running through all your suggestions.

@GemmaTuron I was able to fetch & serve the test model successfully. Thanks for the update. Yes I do have a log file and updates regarding the errors I've encountered. I created this issue, which includes screenshots and my.log file.

Thanks @Zainab-ik ! Yes I do have isaura data lakes installed.

GemmaTuron commented 1 year ago

Great @pauline-banye !

I am closing this issue as resolved then!