Python 为什么它显示错误,即uu init()取1个位置参数,但在i';在请求模块的get方法中传递url

Python 为什么它显示错误,即uu init()取1个位置参数,但在i';在请求模块的get方法中传递url,python,python-requests,request,http-post,get-request,Python,Python Requests,Request,Http Post,Get Request,我试图使用请求模块的get方法,但它不起作用。有人能帮我解决这个问题吗 import requests r = requests.get('https://www.python.org') print(r.status_code) 这是我的错误: $ python request_testing.py Traceback (most recent call last): File "request_testing.py", line 4, in <module&

我试图使用请求模块的get方法,但它不起作用。有人能帮我解决这个问题吗

import requests

r = requests.get('https://www.python.org')
print(r.status_code)
这是我的错误:

$ python request_testing.py
Traceback (most recent call last):
  File "request_testing.py", line 4, in <module>
    get('http://www.python.org')
  File "C:\Python38\lib\site-packages\requests\adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "C:\Python38\lib\site-packages\requests\adapters.py", line 315, in get_connection
    conn = self.poolmanager.connection_from_url(url)
  File "C:\Python38\lib\site-packages\urllib3\poolmanager.py", line 298, in connection_from_url
    return self.connection_from_host(
  File "C:\Python38\lib\site-packages\urllib3\poolmanager.py", line 245, in connection_from_host
    return self.connection_from_context(request_context)
  File "C:\Python38\lib\site-packages\urllib3\poolmanager.py", line 260, in connection_from_context
    return self.connection_from_pool_key(pool_key, request_context=request_context)
  File "C:\Python38\lib\site-packages\urllib3\poolmanager.py", line 281, in connection_from_pool_key
    pool = self._new_pool(scheme, host, port, request_context=request_context)
  File "C:\Python38\lib\site-packages\urllib3\poolmanager.py", line 213, in _new_pool
    return pool_cls(host, port, **request_context)
  File "C:\Python38\lib\site-packages\urllib3\connectionpool.py", line 197, in __init__
    self.pool = self.QueueCls(maxsize)
TypeError: __init__() takes 1 positional argument but 2 were given
$python请求\u testing.py
回溯(最近一次呼叫最后一次):
文件“request_testing.py”,第4行,在
得到('http://www.python.org')
文件“C:\Python38\lib\site packages\requests\adapters.py”,第412行,在send中
conn=self.get\u连接(request.url,代理)
get\U连接中的文件“C:\Python38\lib\site packages\requests\adapters.py”,第315行
conn=self.poolmanager.connection\u from\u url(url)
文件“C:\Python38\lib\site packages\urllib3\poolmanager.py”,第298行,在\u url的连接中
从主机返回self.connection\u(
文件“C:\Python38\lib\site packages\urllib3\poolmanager.py”,第245行,连接来自\u主机的\u
从上下文返回self.connection(请求上下文)
文件“C:\Python38\lib\site packages\urllib3\poolmanager.py”,第260行,在\u上下文的\u连接中
从池键返回self.connection(池键,请求上下文=请求上下文)
文件“C:\Python38\lib\site packages\urllib3\poolmanager.py”,第281行,在\u pool\u键的连接中
pool=self.\u new\u pool(方案、主机、端口、请求上下文=请求上下文)
文件“C:\Python38\lib\site packages\urllib3\poolmanager.py”,第213行,在新池中
返回池\u cls(主机、端口、**请求\u上下文)
文件“C:\Python38\lib\site packages\urllib3\connectionpool.py”,第197行,在\uuu init中__
self.pool=self.QueueCls(maxsize)
TypeError:\uuuu init\uuuuuu()接受1个位置参数,但提供了2个

requests和
urllib3
的版本号分别是什么?2.25.1和1.26.2这很奇怪。在我的机器上,您的代码与库版本相同,我运行起来没有任何问题。唯一的区别是:我仍然在使用Python 3.7。那么现在我应该做什么
requests
的版本号是什么de>urllib3?2.25.1和1.26.2这很奇怪。在我的机器上,您使用相同库版本的代码为我运行时没有任何问题。唯一的区别是:我仍在使用Python 3.7。那么现在我该怎么办