ImportError: cannot import name 'Client'
Closed this issue · 6 comments
Hi,
I tried to use the Python SDK according to the given example.
First of all there's an extra parentheses at the end, I removed it, but then I get this error:
ImportError: cannot import name 'Client'
I use Python 3.6.5 on Windows 10.
Hi there, we'll take a look at this and get back to you soon thanks
@szedjani Hi there,
just trying to diagnose the error you are getting, would you please be able to post the exact piece of code you are trying to run? Thanks.
The exact same piece of code:
from predicthq import Client
phq = Client(access_token="$ACCESS_TOKEN")
@szedjani Sorry another question. What is the name of file that you are trying to run this code from? Is it predicthq.py
? Or is there a folder somewhere in your project that has predicthq
as a name? Thanks.
You are correct, the file was named predicthq.py and python tried to import the same file instead of the predicthq module. Silly mistake. Sorry for wasting your time.
@szedjani no worries. Always happy to help. Thanks.