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

[Bug] Should grass.script expose ScriptError from wildcard imports? #4838

Open
echoix opened this issue Dec 14, 2024 · 0 comments
Open

[Bug] Should grass.script expose ScriptError from wildcard imports? #4838

echoix opened this issue Dec 14, 2024 · 0 comments
Labels
bug Something isn't working Python Related code is in Python

Comments

@echoix
Copy link
Member

echoix commented Dec 14, 2024

Describe the bug

https://github.com/OSGeo/grass/blob/3b5184f3454c69afdf2844479403a5d8ef5d24e0/python/grass/script/__init__.py now lists the names for wildcard imports, in the __all__ variable.
The text ScriptError is found 55 times. In some calls in gui, it is used like

  • gs.ScriptError multiple times
  • gcore.ScriptError in gui/wxpython/animation/dialogs.py
  • grass.ScriptError in gui/wxpython/gui_core/forms.py, where grass is from grass.script import core as grass
  • ScriptError in gui/wxpython/core/toolboxes.py and more, where from grass.exceptions import ScriptError, CalledModuleError is used

What should be done? Technically, we show that ScriptError isn't listed from grass.script in the init file.

@echoix echoix added bug Something isn't working Python Related code is in Python labels Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Related code is in Python
Projects
None yet
Development

No branches or pull requests

1 participant