For programs that used to run well under pychar, two logs were added today. For no reason, an error was reported, saying that no request could be found under urllib…
an error was reported: module ‘urllib’ has no attribute ‘request’
After checking, it is said that sometimes Python 3 will draw wind and will not automatically import submodules into it, so for the sake of safety, it should be changed to:
import urllib.request
That’s it… It’s speechless
Similar Posts:
- No module named ‘urllib.request’; ‘urllib’ is not a package
- ModuleNotFoundError No module named urllib2
- Pycharm cannot import the third-party library no module named urllib3
- How to Solve Python Error: “HTTP Error 403: Forbidden”
- Python: Centos + gunicorn+flask ImportError: No module named request
- Differences of urllib, urllib2, httplib and httplib2 libraries in Python
- Sublime text install Emmet (Zen coding) plug in
- Python crawling picture prompt urllib.error.httperror: http error 403: forbidden solution
- MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors
- [Solved] Python3.7 Install urllib.parse[UNK]json[UNK]re