Python script execution requests dependent package warning:
C:\Python36\lib\site-packages\requests\__ init__. py:80: RequestsDependencyWarning: urllib3 (1.26.4) or chardet (4.0.0) doesn’t match a supported version! RequestsDependencyWarning)
Reason: the version of urllib3 (1.26.4) or chardet (4.0.0) in Python library is not compatible
– – – –
let’s talk about the solution first: this prompt means that the current version of urllib3 is 1.26.4 and chardet is 4.0.0__ init__ The version required in the file does not match. Follow the prompts to open the__ init__ File, line 80, you can see that there are detailed regulations for the versions of these two files, which are between the two version numbers. Here, my urllib3 or chardet is higher than the version number specified in the file, so I need to update the requests version to a higher version. Update command to pip install upgrade requests.
Let’s talk about the background of writing this article: last week, I debugged the interface and called the requests method very smoothly. Today, when I suddenly executed this interface again, I reported the initial error. At the beginning, I didn’t know what it meant, so I went to the Internet to search, and then I started to try. For example, someone suggested using the uninstall method to unload urllib and chardet. So I just brain, regardless of all, first to unload the urllib. It’s OK to uninstall it. When I install it again, I can’t understand the error reported. Maybe the requests library can’t run normally. Well, use PIP install third party library name again To install, who knows that my computer has turned on the agent by default when I don’t pay attention to it, so all kinds of errors that failed to install PIP pop up. There is no screenshot. The main idea is that the server host is inconsistent with the proxy host. Because of this mistake, it is another online search solution. Finally, it is found. The answer is concise and accurate. It is precisely located at the problem: the computer agent has been opened. Hurry to shut down the agent So: PIP install urllib3 is successful, PIP install upgrade requests is successful.
Time: it took me about one day to solve this problem, and finally let me solve it. It can also be regarded as a bit of harvest on the way of learning interface automation. I know how to solve this problem in the future.
Perfect, sprinkle flowers
Read More:
- error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MTd_StaticDebug’ doesn’t match value ‘
- Error 1136 (21s01): column count doesn’t match value count at row 1
- Table ‘sell.hibernate_sequence‘ doesn‘t exist
- Error: the version of ZABBIX database does not match the current requirements
- The version number of robot JS running by electron does not match
- Gradle:Using flatDir should be avoided because it doesn‘t support any meta-data formats.
- Solve syntax error: unexpected end of file or /bin/bash^m: bad interpeneter: no match file or directory
- The Excel connection manager is not supported in the 64-bit version of SSIS [Switch]
- Start eclipse and prompt version 1.7.0_ 79 of the JVM is not suitable for this product. Version: 1.8 or greater i…
- Fedora32 start container error – OCI runtime create failed: This version of runc doesn’t work on cgroups V2: unknown
- A cross-origin error was thrown. React doesn‘t have access to the actual error object in development
- python: HTTP Error 505: HTTP Version Not Supported
- Version 1.8.0_201 of the JVM is not suitable for this product. Version: 11 or greater is required.
- Error: Java: error: release version 5 not supported solution to run error
- This version of chromedriver only supports chrome version 92 crawler simulates the problem of Google plug-in version when the browser clicks and reports an error
- Attributeerror: the solution of module ‘urllib’ has no attribute ‘quote’
- urllib2.HTTPError: HTTP Error 403: Forbidden
- Urllib2.httperror: http error 403: forbidden solution
- pytools.prefork.ExecError: error invoking ‘nvcc –version‘: [Errno 2] No such file or directory