Python Error: class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): - in file cookies.py

Python Error: class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): - in file cookies.py

当我 运行 程序时,我突然遇到错误(在许多文件上)。我认为错误是指位于 Python、cookies.py.

中的另一个文件

class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):

查看此打印屏幕:

这是完整的错误:

>>> 
*** Remote Interpreter Reinitialized ***
Traceback (most recent call last):
  File "E:\Carte\BB - Site Leadership\alte\Ionel Balauta\Aryeht\Task 1 - Traduce tot site-ul\Doar Google Web\Andreea\Meditatii\Sedinta 9 (2022) (EMAIL)\BEBE-PARSING-Python (fara redenumire 2).py", line 1, in <module>
    import requests
  File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\requests\__init__.py", line 63, in <module>
    from . import utils
  File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\requests\utils.py", line 27, in <module>
    from .cookies import RequestsCookieJar, cookiejar_from_dict
  File "C:\Users\Castel\AppData\Roaming\Python\Python310\site-packages\requests\cookies.py", line 172, in <module>
    class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
>>> 

这将解决您的问题:

Copy/Install 在 CMD 上:

pip install uplink

参见here描述: