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 load script /usr/local/lib/avogadro2/scripts/energy/ani2x.py #1620

Open
yurivict opened this issue Feb 12, 2024 · 10 comments
Open

Cannot load script /usr/local/lib/avogadro2/scripts/energy/ani2x.py #1620

yurivict opened this issue Feb 12, 2024 · 10 comments

Comments

@yurivict
Copy link
Contributor

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: 1.99.0
  • Qt: (e.g., 5.9.5)

Desktop version: (please complete the following information):

  • OS: FreeBSD 14.0
  • Compiler: clang-16

Describe the bug
These errors are printed at startup (context before and after is added):

"obabel"  found:  "obabel: Open Babel 3.1.1 -- Feb  4 2024 -- 00:51:06"
"Checking for energy scripts in path /home/yuri/.local/share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /usr/local/share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /usr/share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /usr/local/bin/../lib/avogadro2/scripts/energy"
"Cannot load script /usr/local/lib/avogadro2/scripts/energy/ani2x.py"
"Cannot load script /usr/local/lib/avogadro2/scripts/energy/gaff.py"
"Cannot load script /usr/local/lib/avogadro2/scripts/energy/gfn1.py"
"Cannot load script /usr/local/lib/avogadro2/scripts/energy/gfn2.py"
"Cannot load script /usr/local/lib/avogadro2/scripts/energy/gfnff.py"
"Cannot load script /usr/local/lib/avogadro2/scripts/energy/mmff94.py"
"Cannot load script /usr/local/lib/avogadro2/scripts/energy/uff.py"
 registering obmm plugins
"Checking for commands scripts in path /home/yuri/.local/share/OpenChemistry/Avogadro/commands"

It doesn't say what the problem is. These Python scripts can be executed/loaded fine as standalone files.

Copy link

welcome bot commented Feb 12, 2024

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

@ghutchis
Copy link
Member

ghutchis commented Feb 12, 2024

It's not a bug. If you don't have torchani installed, ani2x.py won't run - simply a warning. Similar with openbabel and gaff / mmff94 / uff and xtb-python and the gfn* scripts.

Since some people seem put off by the messages, we'll switch them to being separate plugin downloads.

@yurivict
Copy link
Contributor Author

Is it this torchani?

@ghutchis
Copy link
Member

Yes, exactly. It's not required for avogadro though.

@yurivict
Copy link
Contributor Author

Ok, thanks.

@ghutchis
Copy link
Member

Of course - feedback / bug reports always appreciated!

@yurivict
Copy link
Contributor Author

IMO, you should first test that torchani is installed, and only then run these scripts. This way such error messages would only mean real errors.
And if torchani isn't available, it should say so and it should say what functionality is disabled because of this reason.

This way it would be less confusing and more informative.

@ghutchis
Copy link
Member

avogadro has no way of knowing what packages a script will attempt to load.

I'll see what we can do to tweak the error messages on the script side.

@yurivict
Copy link
Contributor Author

But you know what is in this script because it is installed by your package.

@ghutchis ghutchis transferred this issue from OpenChemistry/avogadroapp Feb 13, 2024
@avo-bot
Copy link

avo-bot commented Feb 14, 2024

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/full-and-privileged-xtb-integration/4953/70

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

3 participants