#3734 closed defect (fixed)
Location wizard on python 3 seems to be broken
Reported by: | pmav99 | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.0 |
Component: | wxGUI | Version: | svn-trunk |
Keywords: | location wizard | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
I compiled grass gis from source using python 3 and the location wizard seems to be broken. More specifically clicking on the "New" location button shows a window with the text:
Unable to read list: dict_items object has no attribute 'sort'
This is rather typical in python2 code which runs with the python3 interpreter. I checked the source code of grass/gui/wxpython/location_wizard/wizard.py and fixed that but then the New button does nothing.
Any suggestions WRT how I could see the full traceback?
BTW, from now on, is python code supposed to be both Python 2 and 3 compatible? Or Python 3 only?
svn diff Index: location_wizard/wizard.py =================================================================== --- location_wizard/wizard.py (revision 73967) +++ location_wizard/wizard.py (working copy) @@ -654,7 +654,8 @@ self.sourceData = data try: - data.sort() + data = sorted(data) + #data.sort() self.DeleteAllItems() row = 0 for value in data:
Change History (6)
comment:1 by , 6 years ago
Keywords: | location wizard added |
---|---|
Milestone: | → 7.8.0 |
follow-up: 4 comment:2 by , 6 years ago
comment:3 by , 6 years ago
Replying to pmav99:
BTW, from now on, is python code supposed to be both Python 2 and 3 compatible? Or Python 3 only?
GRASS 7.8 should be Python 2 and 3 compatible. Python3-only release will be probably GRASS 8.0.
follow-up: 6 comment:4 by , 6 years ago
comment:5 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please try r73972.
It should be compatible with Python 2.7 and 3.