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

AttributeError: partially initialized module 'cbpro' has no attribute 'public_client' (most likely due to a circular import)

Open gehrenfeld opened this issue 4 years ago • 1 comments

Keep getting this error when running:

`from coinbase.wallet.client import Client from coinbase.wallet.model import APIObject import cbpro

public_client = cbpro.public_client coinbase_API_key = "xxxxxxxxxxxxx" coinbase_API_secret = "xxxxxxxxxxxxx" client = Client(coinbase_API_key, coinbase_API_secret)

public_client.get_product_ticker(product_id='ETH-USD') public_client.get_products() data =public_client.get_product_historic_rates('ETH-USD') print(data)`

Python version 3.9

[email protected]

gehrenfeld avatar Dec 03 '21 14:12 gehrenfeld

You likely named the script the same as cbpro, name it something else.

sephethus avatar Jun 15 '22 20:06 sephethus