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

Inspection mode layers crash with Error: TypeError: 'dict_values' object does not support indexing #471

Open
minguo33 opened this issue Sep 21, 2020 · 2 comments

Comments

@minguo33
Copy link

Using Beta v 3, tested with multiple data and layer types.

When using config if setting the 'Inspection' check box under the layer entry in 'Select Layers' to true it throws this error:

Traceback (most recent call last):
File "C:\Users\Nathan\dev\Roam\src\configmanager\ui\configmanagerdialog.py", line 178, in nodeselected
File "C:\Users\Nathan\dev\Roam\src\configmanager\ui\projectwidget.py", line 153, in setpage
File "C:\Users\Nathan\dev\Roam\src\configmanager\ui\layerwidgets.py", line 1120, in set_project
File "C:\Users\Nathan\dev\Roam\src\roam\project.py", line 421, in layer_tools
TypeError: 'dict_values' object does not support indexing

When using Roam and selecting a feature of an inspection layer, Roam throws this error:

Traceback (most recent call last):
File "C:\Users\Nathan\dev\Roam\src\roam\infodock.py", line 366, in layerIndexChanged
File "C:\Users\Nathan\dev\Roam\src\roam\infodock.py", line 466, in update
File "C:\Users\Nathan\dev\Roam\src\roam\project.py", line 421, in layer_tools
TypeError: 'dict_values' object does not support indexing

When continuing to Data Entry it throws another error;

Traceback (most recent call last):
File "C:\Users\Nathan\dev\Roam\src\roam\mapwidget.py", line 694, in queue_feature_for_edit
File "C:\Users\Nathan\dev\Roam\src\roam\mapwidget.py", line 946, in load_form
AttributeError: 'NoneType' object has no attribute 'icon'

and the Form never appears.

If you go back to config all the check boxes under the 'select layer' for the inspection layer are now unchecked.

Google searching the error suggests a Python3 incompatibility

https://stackoverflow.com/questions/17431638/get-typeerror-dict-values-object-does-not-support-indexing-when-using-python

@minguo33
Copy link
Author

Issue still present in 3.0.6

The first error is still thrown in config manager.

Traceback (most recent call last):
File "C:\Users\Nathan\dev\Roam\src\configmanager\ui\configmanagerdialog.py", line 178, in nodeselected
File "C:\Users\Nathan\dev\Roam\src\configmanager\ui\projectwidget.py", line 153, in setpage
File "C:\Users\Nathan\dev\Roam\src\configmanager\ui\layerwidgets.py", line 1120, in set_project
File "C:\Users\Nathan\dev\Roam\src\roam\project.py", line 421, in layer_tools
TypeError: 'dict_values' object does not support indexing

But after saving, the project will not load in Roam.

@minguo33
Copy link
Author

Ok, so this appears to only be an issue with the binary 3.0.6 release.

I swapped out the project.pyc in lib/roam folder the from the release with the project.py from the master source and it worked without issue.

So easily resolved with a repackaging of release I assume.

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

1 participant