I am trying to connect to a database and for that I am using mysql-connector. The code is correct but I get the following error message:
ERROR: HTTP error 404 while getting https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz
If I use command window and type the following:
pip search mysql-connector
I get the error:
ERROR: XMLRPC request failed [code: -32500] RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.
I have also already installed mysql-connector by using:
pip install mysql-connector-python Requirement already satisfied: mysql-connector-python in c:userspf1vmkh9_admappdatalocalprogramspythonpython39libsite-packages (8.0.26) Requirement already satisfied: protobuf>=3.0.0 in c:userspf1vmkh9_admappdatalocalprogramspythonpython39libsite-packages (from mysql-connector-python) (3.18.1)
So why do I get that error message?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
A note: pip search not working is intended, as the error says – pip list/search was abused and was disabled. You should use PyPI manually to access information on packages – https://pypi.org/project/mysql-connector-python
As to your error… it tries to download
mysql-connector-python-2.1.3.tar.gz, while your pip says
Requirement already satisfied: mysql-connector-python in c:userspf1vmkh9_admappdatalocalprogramspythonpython39libsite-packages (8.0.26).
Look at the versions: 2.1.3 vs 8.0.26.
This means you either use wrong python version to run the project or something inside tries to use (and download) some really old code. Which is just no longer hosted at that url, hence you get 404 (not found).
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0