#2480 closed defect (fixed)
v.class.ml: ImportError: No module named training_extraction
Reported by: | mlennert | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.5 |
Component: | Addons | Version: | svn-releasebranch70 |
Keywords: | v.class.ml g.extension | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
Using g.extension to install v.class.ml in a fresh grass70release compile, I get:
g.extension extension=v.class.ml svnurl=http://svn.osgeo.org/grass/grass-addons/grass7 Fetching <v.class.ml> from GRASS-Addons SVN repository (be patient)... Compiling... Traceback (most recent call last): File "/tmp/tmpj4o0hW/v.class.ml/scripts/v.class.ml", line 375, 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.
Attachments (2)
Change History (30)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
I can't work this out. Also, I have the same, I think, problem with a new script of mine from which I import an external .py file. Any ideas?
follow-up: 4 comment:3 by , 10 years ago
I guess after cleaning old compiled stuff, and installing sklearn, all works fine now.
follow-up: 5 comment:4 by , 10 years ago
Replying to nikosa:
I guess after cleaning old compiled stuff, and installing sklearn, all works fine now.
Could you explain what exactly you did to make it work ? Did you use g.extension, or compiled it from a source tree on your machine ?
When I compile manually with MODULE_TOPDIR set to my source dir, everything works fine, i.e. the main v.class.ml ends up in scripts/ and all the additional files get copied to etc/v.class.ml/.
However, when I use g.extension, only the main script gets copied to .grass7/addons/scripts whereas nothing is copied to .grass7/addons/etc.
Moritz
follow-up: 6 comment:5 by , 10 years ago
Replying to mlennert:
Replying to nikosa:
I guess after cleaning old compiled stuff, and installing sklearn, all works fine now.
Could you explain what exactly you did to make it work ? Did you use g.extension, or compiled it from a source tree on your machine ?
I compiled from a local copy of the source tree (v.70)
When I compile manually with MODULE_TOPDIR set to my source dir, everything works fine, i.e. the main v.class.ml ends up in scripts/ and all the additional files get copied to etc/v.class.ml/.
However, when I use g.extension, only the main script gets copied to .grass7/addons/scripts whereas nothing is copied to .grass7/addons/etc.
g.extension fails here too.
follow-up: 7 comment:6 by , 10 years ago
Replying to nikosa:
However, when I use g.extension, only the main script gets copied to .grass7/addons/scripts whereas nothing is copied to .grass7/addons/etc.
g.extension fails here too.
please try recent version, this issue should be fixed also in g70.
comment:7 by , 10 years ago
Replying to martinl:
Replying to nikosa:
However, when I use g.extension, only the main script gets copied to .grass7/addons/scripts whereas nothing is copied to .grass7/addons/etc.
g.extension fails here too.
please try recent version, this issue should be fixed also in g70.
Trunk, make distcleaned, updated, and compiled yesterday (r63985):
g.extension extension=v.class.ml svnurl=http://svn.osgeo.org/grass/grass-addons/grass7 Fetching <v.class.ml> from GRASS-Addons SVN repository (be patient)... Compiling... Traceback (most recent call last): File "/tmp/tmpJCQjBq/v.class.ml/scripts/v.class.ml", line 387, 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.
Moritz
comment:8 by , 10 years ago
Milestone: | → 7.0.0 |
---|
comment:9 by , 10 years ago
Any news for this one? I have the same problem when tryin to compile i.segment.hierarchical (#2534) and a new script of mine as well.
follow-up: 11 comment:10 by , 9 years ago
I have the same problem. Installing v.class.ml with g.extension worked once, then stopped working:
GRASS 7.1.svn (nc_spm_08_grass7):~ > g.extension ext=v.class.ml Fetching <v.class.ml> from GRASS GIS Addons repository (be patient)... Compiling... Traceback (most recent call last): File "/tmp/grass7-laurent-26795/tmpHjMas6/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.
I opened a new ticket because it seems more general than just v.class.ml: #2968
comment:11 by , 9 years ago
Replying to lrntct:
I have the same problem. Installing v.class.ml with g.extension worked once, then stopped working:
I cannot reproduce this error with fresh trunk:
Fetching <v.class.ml> from GRASS GIS Addons repository (be patient)... CompilinFetching <v.class.ml> from GRASS GIS Addons repository (be patient)... Compiling... Installing... Updating addons metadata file... Installation of <v.class.ml> successfully finished
Do you have fresh GRASS installation? Installing... Updating addons metadata file... Installation of <v.class.ml> successfully finished
follow-up: 13 comment:12 by , 9 years ago
I just updated to last daily build from grass-devel Ubuntu ppa. I still have the same issue:
Fetching <v.class.ml> from GRASS GIS Addons repository (be patient)... Compiling... Traceback (most recent call last): File "/tmp/grass7-laurent-30486/tmpOu93Rh/v.class.ml/scrip ts/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.
comment:13 by , 9 years ago
follow-up: 15 comment:14 by , 9 years ago
I tried with build r68156 and still have the same error:
Fetching <v.class.ml> from GRASS GIS Addons repository (be patient)... Compiling... Traceback (most recent call last): File "/tmp/grass7-laurent-20103/tmpx5FmGI/v.class.ml/scrip ts/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.
follow-up: 16 comment:15 by , 9 years ago
follow-ups: 17 18 comment:16 by , 9 years ago
Replying to martinl:
Replying to lrntct:
I tried with build r68156 and still have the same error:
are you sure that you don't have any local changes in the source code, any conflicts? Please remove
~.grass7/addons
dir and try again.I am not able to reproduce it even with
grass-daily
package or self-compiled relbr70.
I haven't done any change to the source code. Just tried to install it because I have similar issues with other python modules containing various files (cf. #2968).
I did remove ~.grass7/addons
and the installation of v.class.ml worked. But it might worth investigating because a similar issue is still happening with other modules (cf. #2968).
comment:17 by , 9 years ago
comment:18 by , 9 years ago
comment:19 by , 9 years ago
Here what happen with last svn build when trying to install r.agent:
GRASS 7.1.svn (nc_spm_08_grass7):~ > rm -rf ~/.grass7/addons/ GRASS 7.1.svn (nc_spm_08_grass7):~ > g.extension r.agent Fetching <r.agent> from GRASS GIS Addons repository (be patient)... Compiling... Traceback (most recent call last): File "/tmp/grass7-laurent-18761/tmpfpR4tp/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.
I will upload the resulting content of ~/.grass7/addons/
comment:20 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
follow-up: 26 comment:24 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
comment:26 by , 8 years ago
v.class.ml
was not compiling for me with g.extension
:
> g.extension v.class.ml Fetching <v.class.ml> from GRASS GIS Addons repository (be patient)... Compiling... Traceback (most recent call last): File "/tmp/grass7-vpetras-6663/tmpXvI6fK/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.
Thanks to g.extension -d
I was able to test the code from r.agent
and use it in r69389. g.extension v.class.ml
works for me now.
To complete, compiling from the grass-addons tree works fine;