Closed bbelletti closed 2 years ago
Same error with version 3.4.14
I have not been able to reproduce this on any version of QGIS so far on windows 10 64-bit
Here are the versions I've tried:
QGIS version
3.28.0-Firenze
QGIS version
3.26.3-Buenos Aires
QGIS version
3.16.10-Hannover
Is this a fresh install? Have you customized the python paths or modules in any way? I see a reference to C:\OSGeo4W/
which makes me think your python interpreter may be referencing the wrong modules folder or something like that.
when you type import lxml
in the python console in QGIS do you see an error?
You can try the following (again, inside the QGIS python console) to see which paths are being used by python
import sys
print(sys.path)
Is this a fresh install? Have you customized the python paths or modules in any way? I see a reference to C:\OSGeo4W/ which makes me think your python interpreter may be referencing the wrong modules folder or something like that.
@MattReimer I was working with @bbelletti (you will meet her in November) and had her post this. The Q3.4.14 is an older install, but the Q 3.28.0 was a brand new install. This is a windows machine, but it is configured for French.
@bbelletti are you able to
when you type import lxml in the python console in QGIS do you see an error?
You can try the following (again, inside the QGIS python console) to see which paths are being used by python
@MattReimer, for what it is worth, when I type in my Q 3.26.3 Python prompt import lxml
, I get:
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS32~2.3\apps\Python39\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\PROGRA~1/QGIS32~2.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'lxlml'
But my system is also successfully running and has QRAVE installed?
My sys.path
returns:
import sys
print(sys.path)
['C:/PROGRA~1/QGIS32~2.3/apps/qgis/./python', 'C:/Users/joemw/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/joemw/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 'C:/PROGRA~1/QGIS32~2.3/apps/qgis/./python/plugins', 'C:\\Program Files\\QGIS 3.26.3\\bin\\python39.zip', 'C:\\PROGRA~1\\QGIS32~2.3\\apps\\Python39\\DLLs', 'C:\\PROGRA~1\\QGIS32~2.3\\apps\\Python39\\lib', 'C:\\Program Files\\QGIS 3.26.3\\bin', 'C:\\PROGRA~1\\QGIS32~2.3\\apps\\Python39', 'C:\\PROGRA~1\\QGIS32~2.3\\apps\\Python39\\lib\\site-packages', 'C:\\PROGRA~1\\QGIS32~2.3\\apps\\Python39\\lib\\site-packages\\win32', 'C:\\PROGRA~1\\QGIS32~2.3\\apps\\Python39\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~1\\QGIS32~2.3\\apps\\Python39\\lib\\site-packages\\Pythonwin', 'C:/Users/joemw/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python']
@joewheaton you have a typo. it's not lxlml
. It's lxml
and if QRave is working for you I would not expect an error as we depend on this library heavily. I haven't seen any evidence that lxml has been removed from QGIS or anything drastic like that so I suspect that what we're dealing with here is a configuration issue on one machine.
Also, for completeness, we did troubleshoot trying to uninstall and download a zip of a previous release and that didn't work either.
Yeah. I should probably refrain from making guesses without debugging thoroughly... but if I had to guess I'd say there's probably an environment variables set on the windows system or windows profile level that's setting PYTHONPATH to something it shouldn't be. This can cause QGIS to get confused about A) which modules to use and B) which version of python to use,.
So, for what its worth, on my system (which also has the lxml
problem in its Python, when I go to System
→ About → Advanced System Settings → Advanced Tab → Environmental Variables, and reveal Path Settings, this is what I have:
I can try and help troubleshoot @bbelletti tomorrow if we need it. Thanks @MattReimer.
@joewheaton I don't think you have the same problem, you just mis-typed lxml
from the error you sent me: ModuleNotFoundError: No module named 'lxlml'
Note the extra l
?
Ha! Good catch @MattReimer. Moving to fast. The problem I have is typing.... accurately.
In the end this was not actually a problem. The OSGEO install makes you explicitly install python modules. Once we installed the correct ones (i.e. lxml, scipy and shapely) the plugin started working again.
Thanks a ton @MattReimer for helping @bbelletti and I through this. We got both QRiS and QRAVE going. Just to clarify, QRAVE only needed the lxml
, whereas QRiS needed scipy
and shapely
to work for 0.1.5.
FYI @philipbaileynar
@joewheaton instead of having an individual checklist for each of our plugins (tedious) why not just have a "Recommended modules for Riverscapes tools" list that we maintain in one place?
Again, as far as we know this affects only OSGEO4W installs and only OSGEO4W installs that are non-default so it's a pretty thin slice.
Error message thrown: