[Python] Name Error: name'urlparse' is not defined

When I was scraping with Python, I got NameError: name'urlparse' is not defined, so make a note of the solution.

Cause

It looks like you're getting this error because you don't have a module to use the urlparse method. https://stackoverflow.com/questions/58347029/fail-nameerror-name-urlparse-is-not-defined

solution

Install the module to use ʻurlparse`

$ pip install urlparse3

(Click here for Python2)

$ pip install urlparse2

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

Recommended Posts

[Python] Name Error: name'urlparse' is not defined
Python Not Implemented Error
Python round is not strictly round
Python list is not a list
NameError: name'__file__' is not defined
Today's python error: image is blank
Import error even though python is installed
Python is easy
Python Pandas is not suitable for batch processing
Python log is not output with docker-compose up
Python Error Handling
What is python
[Hyperas] Type Error: Resolving'function' object is not subscriptable
Python is instance
What is Python
[Python] Type Error:'WebElement' object is not iterable What to do when an error occurs
Investigate the cause when an error is thrown when python3.8 is not found when using lambda-uploader with python3.8
[Python] Lint pylint is not installed is displayed [VS Code]
Today's python error: HTTPError: 404 Client Error: Not Found for url:
python> check NoneType or not> if a == None:> if a is None:
Python memo using perl-Dictionary type (case is not valid)
When "ERROR: HTTP is not supported." Is displayed in mpsyt
Weird Python error message ——Is that code really executed?
[Python] What is Pipeline ...
Today's python error: killed
Python error list (Japanese)
Name identification using python
[Python] What is virtualenv
[Python] for statement error
Test.py is not reflected on the web server in Python3.
[Python] Reason why index error does not occur in slice
Python error support note: "... does not support argument 0 of type float ..."
Python Boolean operation return value is not always bool type
Get the class name where the method is defined in the decorator
pip install scikit-learn says Numerical Python (NumPy) is not installed.
NameError: global name'dot_parser' is not defined and what to do when it comes up in python