pythonpython-3.xwindows-10

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


when I run the program I suddenly get an error (on many files). I think the error refers to another file located in Python, cookies.py.

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

See this print screen:

enter image description here

HERE IS THE FULL ERROR:

>>> 
*** Remote Interpreter Reinitialized ***
Traceback (most recent call last):
  File "E:\Carte\BB\17 - 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'
>>> 

Solution

  • THIS WILL SOLVE YOUR PROBLEM:

    Copy/Install this on CMD:

    pip install uplink

    See here the description: