coinbasepro-python icon indicating copy to clipboard operation
coinbasepro-python copied to clipboard

module 'cbpro' has no attribute 'WebsocketClient'

Open cyberguilletell opened this issue 5 years ago • 3 comments

I try to run this example that appear in the readme

# import PyMongo and connect to a local, running Mongo instance
from pymongo import MongoClient
import cbpro
mongo_client = MongoClient('mongodb://localhost:27017/')

# specify the database and collection
db = mongo_client.cryptocurrency_database
BTC_collection = db.BTC_collection

# instantiate a WebsocketClient instance, with a Mongo collection as a parameter
wsClient = cbpro.WebsocketClient(url="wss://ws-feed.pro.coinbase.com", products="BTC-USD",
    mongo_collection=BTC_collection, should_print=False)
wsClient.start()

and I got this error

AttributeError: module 'cbpro' has no attribute 'WebsocketClient'

I check with the pip freeze and I got his version

cbpro==1.1.4

Even I try to install direct from de repo pip install git+git://github.com/danpaquin/coinbasepro-python.git and continue with the same issue

cyberguilletell avatar Sep 06 '20 08:09 cyberguilletell

Are you still seeing this? I'm unable to reproduce. I've tried Python 2.7 and 3.8 and I've tried both the pip version and the git version of cbpro.

mcardillo55 avatar Nov 22 '20 09:11 mcardillo55

Same issue here, even with pip install websocket-client==0.40.0 Please advise

Cristianistrate avatar Dec 26 '20 06:12 Cristianistrate

I have the same issue as well.

AttributeError: module 'cbpro' has no attribute 'WebsocketClient'

geolectric avatar Jan 08 '21 05:01 geolectric