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] wxGUI Interactive Python Shell: help(gs) and AddLayer() failing #1594

Closed
neteler opened this issue May 23, 2021 · 0 comments · Fixed by #1894
Closed

[Bug] wxGUI Interactive Python Shell: help(gs) and AddLayer() failing #1594

neteler opened this issue May 23, 2021 · 0 comments · Fixed by #1894
Labels
bug Something isn't working GUI wxGUI related hacktoberfest Especially suitable for Hacktoberfest Python Related code is in Python
Milestone

Comments

@neteler
Copy link
Member

neteler commented May 23, 2021

Describe the bug

The Python tab offers

Welcome to wxGUI Interactive Python Shell 0.9.8

Type "help(gs)" for more GRASS scripting related information.
Type "AddLayer()" to add raster or vector to the layer tree.

However, both commands fail:

>>> help(gs)
None

and

>>> AddLayer()
Traceback (most recent call last):
  File "/usr/lib64/python3.9/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
TypeError: AddLayer() missing 1 required positional argument: 'name'

Of course this works (demolocation):

AddLayer('country_boundaries')
Vector map <country_boundaries@PERMANENT> added

image

Expected behavior

  • help(gs) should do something useful
  • Type "AddLayer()" to add raster or vector to the layer tree. might be rephrased to e.g.
    • Type "AddLayer('mapname')" to add raster or vector to the layer tree.

Note that help(grass) prints None also in GRASS GIS 7.8.

@neteler neteler added bug Something isn't working GUI wxGUI related labels May 23, 2021
@neteler neteler added this to the 7.8.6 milestone May 23, 2021
@neteler neteler modified the milestones: 7.8.6, 7.8.7 Jun 11, 2021
@wenzeslaus wenzeslaus added Python Related code is in Python hacktoberfest Especially suitable for Hacktoberfest labels Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related hacktoberfest Especially suitable for Hacktoberfest Python Related code is in Python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants