AttributeError: module 'foursquare' has no attribute 'Foursquare'
Closed this issue · 4 comments
burakgulmez commented
"AttributeError: module 'foursquare' has no attribute 'Foursquare'"
I get this error every time.
I use python 3.
My code:
import foursquare
#from foursquare import Foursquare , <--- I tried this but it doesnt work
client_id="..."
client_secret="..."
client = foursquare.Foursquare(client_id=client_id, client_secret=client_secret)
mLewisLogic commented
I just tested it with the following process:
mkdir test_foursquare
cd test_foursquare
virtualenv -p python3.6 .
source bin/activate
pip install foursquare
python
>>> from foursquare import Foursquare
>>> Foursquare.__doc__
'foursquare V2 API wrapper'
Seems like it might be an issue with your environment.
mLewisLogic commented
I'm going to close this for now.
If you can repro your error in a contained and repeatable script, reply here with it and I'll re-open and look into a fix.
burakgulmez commented
I got the same result
>>>python3
Python 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from foursquare import Foursquare
>>> Foursquare.__doc__
'foursquare V2 API wrapper'
>>>
burakgulmez commented
I solved the problem.
That was a big mistake :)
The script name was "foursquare", then i renamed and the problem was solved.