-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
chargeScripts may raise KeyError, "name"
, if external programs are unavailable
#1034
Comments
Okay, but that's by design. If you don't have the programs available, the scripts should fail and Avogadro won't show the methods as options. What would you like to happen? You want the scripts to fail silently? |
…available fix OpenChemistry#1034 Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Thank you for your reply, but at the moment it is unclear why |
Here are the build results |
Here are the build results |
Avogadro version: (please complete the following information from the About box):
Desktop version: (please complete the following information):
Describe the bug
If
avogadro/qtplugins/scriptcharges/chargeScripts/{antechamber,xtb}.py
take option--display-name
, they access"name"
ofgetMetaData()
:avogadrolibs/avogadro/qtplugins/scriptcharges/chargeScripts/antechamber.py
Lines 146 to 147 in 10a7a97
avogadrolibs/avogadro/qtplugins/scriptcharges/chargeScripts/xtb.py
Lines 95 to 96 in 10a7a97
However, the functions return empty dict if
antechamber
/xtb
is unavailable, respectively:avogadrolibs/avogadro/qtplugins/scriptcharges/chargeScripts/antechamber.py
Lines 16 to 19 in 10a7a97
avogadrolibs/avogadro/qtplugins/scriptcharges/chargeScripts/xtb.py
Lines 13 to 16 in 10a7a97
Consequently
getMetaData()["name"]
may raiseKeyError
.This does not terminate execution, though.
To Reproduce
Steps to reproduce the behavior:
He.xyz
:avogadro2 He.xyz
Or, run
Expected behavior
No exception is raised.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here. Please consider uploading or linking test files.
The text was updated successfully, but these errors were encountered: