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] opening attribute table in empty mapset freezes GUI #3078

Closed
cmbarton opened this issue Jul 11, 2023 · 5 comments · Fixed by #3081
Closed

[Bug] opening attribute table in empty mapset freezes GUI #3078

cmbarton opened this issue Jul 11, 2023 · 5 comments · Fixed by #3081
Labels
bug Something isn't working GUI wxGUI related
Milestone

Comments

@cmbarton
Copy link
Contributor

cmbarton commented Jul 11, 2023

Describe the bug
This is a weird bug but it could be a confusing problem for many. If you try to open the attribute table manager from an empty mapset, it freezes the GUI with a 'loading attribute table' message.

To Reproduce

  1. Switch to the sc_spm_08_grass7 demo location
  2. Create a new mapset ("new") in the data manager
  3. Switch to the mapset "new"
  4. Make sure that "new" has access to PERMANENT (g.mapsets)
  5. Add the firestations vector map from PERMANENT to the layer manager
  6. Try to open the attribute table manager window

Expected behavior
Instead of the table manager window, there is a 'loading attribute table' message displayed that never goes away.

System description (please complete the following information):

  • Operating System: MacOS 13.4.1 (ARM)
  • GRASS GIS version: 8.3.0

**Work Around
Copy a vector map to the empty mapset. Then everything works fine and the table manager opens. For some reason, not having the support folders/files for vectors in the current mapset is probably what is causing the freezing. But it shouldn't freeze like that.

If you then delete the vector you've copied into the empty mapset and try to open the attribute table from another mapset, it works fine. So it definitely has something to do with setting up the support for vectors. Either this needs to happen when mapsets are created or the table manager needs to ignore the lack of vector support when opening a table of a vector in a different mapset.

@cmbarton cmbarton added the bug Something isn't working label Jul 11, 2023
@petrasovaa
Copy link
Contributor

I would expect an error in the GUI console, could you check for it?

@tmszi
Copy link
Member

tmszi commented Jul 12, 2023

I confirm this reported behavior:

Error message is:

Traceback (most recent call last):
  File
"/usr/lib64/grass84/gui/wxpython/main_window/frame.py", line
1949, in OnShowAttributeTable

dbmanager = AttributeManager(
  File "/usr/lib64/grass84/gui/wxpython/dbmgr/manager.py",
line 141, in __init__

self.CreateDbMgrPage(parent=self, pageName="manageLayer")
  File "/usr/lib64/grass84/gui/wxpython/dbmgr/base.py", line
842, in CreateDbMgrPage

self.pages[pageName] = DbMgrLayersPage(
  File "/usr/lib64/grass84/gui/wxpython/dbmgr/base.py", line
2868, in __init__

self.manageLayerBook = LayerBook(
  File "/usr/lib64/grass84/gui/wxpython/dbmgr/base.py", line
3100, in __init__

self.defaultConnect["driver"],
self.defaultConnect["database"]
KeyError
:
'driver'

@cmbarton
Copy link
Contributor Author

I get the same error

@petrasovaa
Copy link
Contributor

This is partially addressed by #3086 in the sense that the db is initialized when the mapset is created in GUI, so this problem is unlikely to happen.

@petrasovaa petrasovaa added this to the 8.4.0 milestone Jul 17, 2023
@cmbarton
Copy link
Contributor Author

Thanks. That should solve most cases.

landam pushed a commit to landam/grass that referenced this issue Oct 25, 2023
neteler pushed a commit to nilason/grass that referenced this issue Nov 7, 2023
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants