Opened 5 years ago
Closed 4 years ago
#4014 closed defect (fixed)
v.krige addon: ImportError: cannot import name '_' from 'core.utils'
| Reported by: | neteler | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Addons | Version: | unspecified |
| Keywords: | v.krige | Cc: | |
| CPU: | Unspecified | Platform: | Unspecified |
Description
There is a Python 3 (?) related problem in
https://github.com/OSGeo/grass-addons/blob/master/grass7/vector/v.krige/vkrige_wxgui.py#L25
with
from core.utils import _
Error:
GRASS 7.8.2dev (nc_spm_08):>
g.extention v.krige
v.krige
Loading dependencies, please wait...
...
R[write to console]: rgdal: version: 1.4-8, (SVN revision 845)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 2.3.2, released 2018/09/21
Path to GDAL shared files: /usr/share/gdal
GDAL binary built with GEOS: TRUE
Loaded PROJ.4 runtime: Rel. 5.2.0, September 15th, 2018, [PJ_VERSION: 520]
Path to PROJ.4 shared files: (autodetected)
Linking to sp version: 1.3-2
Traceback (most recent call last):
File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-gnu/scripts/v.krige", line 460, in <module>
main()
File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-gnu/scripts/v.krige", line 341, in main
import vkrige_wxgui as GUI
File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-gnu/etc/v.krige/vkrige_wxgui.py", line 25, in <module>
from core.utils import _
ImportError: cannot import name '_' from 'core.utils' (/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-gnu/gui/wxpython/core/utils.py)
Any idea how to fix that? Thanks
Change History (3)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Thanks, that helps.
Still, there is a new error:
g.extension v.krige
v.krige
Loading dependencies, please wait...
...
Traceback (most recent call last):
File "/home/mneteler/.grass7/addons/scripts/v.krige", line 461, in <module>
main()
File "/home/mneteler/.grass7/addons/scripts/v.krige", line 349, in main
controller=controller)
File "/home/mneteler/.grass7/addons/etc/v.krige/vkrige_wxgui.py", line 415, in __init__
self.Panel = KrigingPanel(self, Rinstance, controller)
File "/home/mneteler/.grass7/addons/etc/v.krige/vkrige_wxgui.py", line 127, in __init__
controller=controller)
File "/home/mneteler/.grass7/addons/etc/v.krige/vkrige_wxgui.py", line 273, in CreatePage
controller=controller)))
File "/home/mneteler/.grass7/addons/etc/v.krige/vkrige_wxgui.py", line 632, in __init__
self.LeftSizer.Insert(2, item=VariogramSubSizer)
TypeError: Sizer.Insert(): arguments did not match any overloaded call:
overload 1: 'item' is not a valid keyword argument
overload 2: 'item' is not a valid keyword argument
overload 3: 'item' is not a valid keyword argument
overload 4: 'item' is not a valid keyword argument
overload 5: 'item' is not a valid keyword argument
overload 6: 'item' is not a valid keyword argument
overload 7: argument 'item' has unexpected type 'BoxSizer'
overload 8: 'item' is not a valid keyword argument
overload 9: 'item' is not a valid keyword argument
comment:3 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Meanwhile g.extension v.krige runs successfully, closing.
Note:
See TracTickets
for help on using tickets.

Replying to neteler:
Simply delete this line. This import is no longer needed, see https://github.com/OSGeo/grass/blob/master/lib/python/__init__.py#L8