mauroalberti / qProf

Python plugin for QGIS, to create topographic and geological profiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No module named urllib.request

L-I-S-T-A opened this issue · comments

I cannot install qProf plugin, I receive the message: "ImportError: No module named urllib.request".
In the directory "Python36" there are the directories and file "Python36\Lib\urllib\request.py"!
Where could be the problem?

But from your message I understand that you are using Python 3.6.
qProf is currently just for QGIS 2.x, that uses Python 2.7 or however 2.x. Even if you have both Python 3 .x and 2.x, and your QGIS is using (as expected) Python 2.x, urlib is a standard library module, so it should be already available in your Python 2.x.

Which OS and QGIS version are you using? And how did you try to install qProf? From the QGIS Python plugin manager or in any other way?

In qProf the only use of an internet-related module should be for opening the help html file. But the used module is webbrowser, not urllib. And also webbrowser is a standard library Python module, so it should be there.
Would it be possible to look at the full stack of error-messages, that ends with "ImportError: No module named urllib.request", to understand where and why urllib is called?
Moreover, when typing in the QGIS Python console:
import webbrowser
webbrowser.open("http://www.google.com")
what are the results?

Good that you solved the problem...

mauro