[Python] ModuleNotFoundError: No module named'urlparse'

Error when I want to combine URLs in Python scraping ModuleNotFoundError: No module named'urlparse'

Cause

I can't find the urlparse module (** import ** is not created)

sample.ry


from urllib.parse import urlparse
from urllib.parse import urljoin

# ModuleNotFoundError: No module named 'urlparse

solution

sample.ry


try:
    import urlparse
except ImportError:
    import urllib.parse as urlparse

# OK

reference https://www.it-swarm.dev/ja/python/python%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%ABurlparse%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93/961197002/ https://qiita.com/__xxx/items/577b494e1725e5173be5 https://github.com/heroku/kafka-helper/issues/6 https://qiita.com/Go-zen-chu/items/d7e6b9af0bd90c7aabca

Recommended Posts

[Python] ModuleNotFoundError: No module named'urlparse'
Python error: ModuleNotFoundError: No module named'flask'
ModuleNotFoundError: No module named'py4j'
Today's python error: ModuleNotFoundError: No module named
Today's python error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named'flask_sqlalchemy'
Today's python error: ModuleNotFoundError: No module named'requests'
ModuleNotFoundError in Python: No module named story
Today's python error: ModuleNotFoundError: No module named'bs4'
ModuleNotFoundError: No module named'_bz2' error in pyenv Python
Import cv2 ModuleNotFoundError: No module named'cv2' in python3
ModuleNotFoundError in poetry: No module named'setuptools'
Python module import
Suddenly with Python PyInstaller No module named pyinstaller
Microsoft Cognitive Toolkit: ModuleNotFoundError: No module named'cntk._cntk_py'
ModuleNotFoundError: No module named'***' when running Flask
Python collections module
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
Import Error in Python3: No module named'xxxxx'
python> import seiral> ImportError: No module named serial
Python module (Python learning memo ④)
Create a Python module
python original module import
ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
Sort Python module imports alphabetically
How Python module import works
About the Python module venv
Automatic update of Python module
I got "ModuleNotFoundError: No module named'azure'" when running a program using Azure SDK for Python
A story about a Python beginner who was about to be crushed by ModuleNotFoundError: No module named'tweepy'
Ruby, Python Module Installation Guide
Python debug and test module
Resolve No module named tkinter
A story about a python beginner stuck with No module named'http.server'
How to resolve ModuleNotFoundError: No module named XXX in Jupyter Notebook
Why ModuleNotFoundError: No module named'dataset.mnist' appears in "Deep Learning from scratch".
python / netCDF / CentOS 6.8> ImportError: No module named netCDF4> sudo yum install netcdf4-python.x86_64
Error when installing opencv-python on jetson nano (ModuleNotFoundError: No module named'skbuild')
That Python code has no classes ...
[Python] logging in your own module
'lambda_function': No module named When'selenium' appears
Cooperation between python module and API
[Code] Module and Python version output
Use blender as a python module
There is no switch in python
Python3 socket module and socket communication flow
Python unittest module execution in vs2017
Python My Number verification module released
Try using the Python Cmd module
Python executable file conversion module comparison 2
Looking for location for mercurial python module
[Question] No module named'Selenium' in PyCharm
Master the weakref module in Python
I get a Python No module named'encodings' error with the aws command