Opened 3 years ago

Closed 3 years ago

#2968 closed defect (fixed)

g.extension problem with module containing various python files: "ImportError: No module named"

Reported by: lrntct Owned by: martinl
Priority: major Milestone: 7.0.5
Component: Addons Version: svn-trunk
Keywords: g.extension Cc: grass-dev@…
CPU: x86-64 Platform: Linux

Description

I encounter an error while trying to install r.agent:

Fetching <r.agent> from GRASS GIS Addons repository (be patient)...
Compiling...
Traceback (most recent call last):
  File "/tmp/grass7-laurent-26795/tmpSuOPAa/r.agent/scripts/r.agent.aco", line 234, in <module>
    import error, grassland, anthill
ImportError: No module named error
make[1]: *** [r.agent.aco.tmp.html] Error 1
/bin/sh: 1: cannot create /usr/lib/grass71/error.log: Permission denied
make: *** [r.agent.aco] Error 2
ERROR: Compilation failed, sorry. Please check above error messages.

The same error occurs while trying to install v.class.ml (although it worked once, but then stopped working):

Fetching <v.class.ml> from GRASS GIS Addons repository (be patient)...
Compiling...
Traceback (most recent call last):
  File "/tmp/grass7-laurent-26795/tmpZf46jp/v.class.ml/scripts/v.class.ml", line 386, in <module>
    from training_extraction import extract_training
ImportError: No module named training_extraction
make: *** [v.class.ml.tmp.html] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

It seems to be related to python modules that includes several python files. I encounter the same problem with a module of mine(cf. https://lists.osgeo.org/pipermail/grass-dev/2016-March/079481.html)

Meanwhile, v.in.wfs2 installation goes well, although its Makefile is very similar to v.class.ml.

It might be related to : #2480 #2534 #2865

Change History (6)

comment:1 Changed 3 years ago by martinl

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

Please try r68156 (trunk)

comment:2 in reply to:  1 Changed 3 years ago by lrntct

Replying to martinl:

Please try r68156 (trunk)

Thanks for your help. I just tried it and v.class.ml and r.agent still fail to install with same errors.

comment:3 Changed 3 years ago by lrntct

Removing ~.grass7/addons solved the problem for v.class ml (see #2480), but r.agent still fail:

Fetching <r.agent> from GRASS GIS Addons repository (be patient)...
Compiling...
Traceback (most recent call last):
  File "/tmp/grass7-laurent-14181/tmplbTgeR/r.agent/scripts/r.agent.aco", line 234, in <module>
    import error, grassland, anthill
ImportError: No module named error
make[1]: *** [r.agent.aco.tmp.html] Error 1
/bin/sh: 1: cannot create /usr/lib/grass71/error.log: Permission denied
make: *** [r.agent.aco] Error 2
ERROR: Compilation failed, sorry. Please check above error messages.

comment:4 Changed 3 years ago by martinl

Milestone: 7.0.47.0.5

comment:5 Changed 3 years ago by neteler

See also #2865 for a similar issue

comment:6 Changed 3 years ago by martinl

Resolution: fixed
Status: assignedclosed

Since r69193 r.agent is installed by g.extension properly. Also v.class.ml can be installed successfully. I am taking liberty to close this ticket. Feel free to re-open if needed. See #2480

Note: See TracTickets for help on using tickets.