[QGIS-Developer] Module not recognized in Python

Paul Riedel ben.jamin at posteo.de
Wed Feb 6 03:04:32 PST 2019


Dear Devs.

Kind of a help request here. Usually I would ask in a Discord or some 
other chat program but there doesn't seem to be one?
I am trying to write a plugin to import Open Mining Format data into 
QGIS(and maybe export it??)
Anyway, I went through the process of setting up a new plugin through 
the Plugin Creator Plugin, went through the hassle of doing the 
resources on Windows by doing
https://gis.stackexchange.com/questions/273552/pyrcc5-is-not-recognized-as-an-internal-or-external-command 

since OS4Geo-shell doesn't recognize the bin and has no access to the 
.exe for some reason.

So the plugin initializes and shows in QGIS.
Now, I copied the OMF library files into my plugin folder so now it 
contains
python\plugins\omf_loader\omf\
However, upon trying to import the library by calling "import omf" or 
"from . import omf" in the "run" Method, I get the error that the 
library can not be found.
This is weird since I had a look at other plugins and they also use 
local imports for helper functions...


Can you provide any help?

Paul



More information about the QGIS-Developer mailing list