Search code examples
pythoncryptographycoinbase-api

CbPro python library giving invalid response


When i attempt to use the CBPro api it gives bad responses

import cbpro

Output

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python310\lib\site-packages\cbpro\__init__.py", line 1, in <module>
    from cbpro.authenticated_client import AuthenticatedClient
  File "C:\Python310\lib\site-packages\cbpro\authenticated_client.py", line 10, in <module>
    import requests
  File "C:\Python310\lib\site-packages\requests\__init__.py", line 63, in <module>
    from . import utils
  File "C:\Python310\lib\site-packages\requests\utils.py", line 29, in <module>
    from .cookies import RequestsCookieJar, cookiejar_from_dict
  File "C:\Python310\lib\site-packages\requests\cookies.py", line 174, in <module>
    class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

Solution

  • for me creating a separate instance of python on my desktop with all the right pip imports and files worked. I just copied the imports from my library folder and i put python 3.5.2 into a separate file folder and that worked completely perfect https://www.python.org/downloads/release/python-352/