Comments (9)
@jykim Can you post here the output of python -c "import fitbit; print(fitbit.__version__)"
? Also, what was your method of installation
from python-fitbit.
Hi,
The output was the following:
(probably not very helpful, I guess...)
$ python -c "import fitbit; print(fitbit.version)"
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/fitbit/init.py", line 10, in
from .api import Fitbit, FitbitOauthClient
File "/usr/local/lib/python2.7/dist-packages/fitbit/api.py", line 2, in
import requests
File "/usr/local/lib/python2.7/dist-packages/requests/init.py", line 58, in
from . import utils
File "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 23, in
from .compat import parse_http_list as _parse_list_header
File "/usr/local/lib/python2.7/dist-packages/requests/compat.py", line 7, in
from .packages import charade as chardet
File "/usr/local/lib/python2.7/dist-packages/requests/packages/init.py", line 3, in
from . import urllib3
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/init.py", line 16, in
from .connectionpool import (
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 12, in
from .util import resolve_cert_reqs, resolve_ssl_version, assert_fingerprint
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/init.py", line 18, in
from .timeout import (
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/timeout.py", line 4, in
from ..exceptions import TimeoutStateError
ImportError: cannot import name TimeoutStateError
I installed it via pip command, and here's the verson number if that's what you're looking for:
$ pip freeze|grep fitbit
fitbit==0.1.3
from python-fitbit.
Here's the full output in case this will help:
$ pip freeze
Flask==0.10.1
GnuPGInterface==0.3.2
Jinja2==2.7.3
Landscape-Client==13.07.3
Markdown==2.4.1
MarkupSafe==0.23
PAM==0.4.2
PIL==1.1.7
PyYAML==3.11
Pygments==1.6
SQLAlchemy==0.9.8
Twisted-Core==11.1.0
Werkzeug==0.9.6
apt-xapian-index==0.44
argparse==1.2.1
backports.ssl-match-hostname==3.4.0.2
bokeh==0.6.0
certifi==14.05.14
chardet==2.0.1
colorama==0.3.2
command-not-found==0.2.44
csvkit==0.9.0
dbf==0.94.003
distribute==0.7.3
dropbox==2.1.0
evernote==1.25.0
fitbit==0.1.3
gevent==1.0.1
gevent-websocket==0.9.3
greenlet==0.4.4
gspread==0.2.2
httplib2==0.7.2
ipython==2.1.0
itsdangerous==0.24
jdcal==1.0
keyring==0.9.2
language-selector==0.1
launchpadlib==1.9.12
lazr.restfulclient==0.12.0
lazr.uri==1.0.3
lxml==3.2.1
matplotlib==1.1.1rc
measurement==1.5
myfitnesspal==1.3.0
numpy==1.8.1
oauth==1.0.1
oauth2==1.5.211
oauthlib==0.6.3
openpyxl==2.1.2
pandas==0.14.1
pyOpenSSL==0.12
pycrypto==2.4.1
pyparsing==1.5.2
pyserial==2.5
pystache==0.5.4
python-apt==0.8.3ubuntu7.2
python-dateutil==2.2
python-debian==0.1.21ubuntu1
python-twitter==2.0
pytz==2013b
pyzmq==14.3.1
requests==2.3.0
requests-oauthlib==0.4.1
runipy==0.1.1
scikit-learn==0.15.2
scipy==0.9.0
simplejson==2.3.2
six==1.7.3
sympy==0.7.3
tornado==4.0.1
twitter==1.15.0
ufw==0.31.1-1
urllib3==1.9
wadllib==1.3.0
websocket==0.2.1
wsgiref==0.1.2
xlrd==0.9.3
zope.interface==3.6.1
from python-fitbit.
@jykim Thanks that's exactly what I was looking for, I'll look into it
from python-fitbit.
Any updates on this? :)
from python-fitbit.
@jykim After a closer look, it seems that the problem is with the requests
library. Try import requests
and see if that gives an error. Is it possible for you to update your Python installation, perhaps with the deadsnakes python2.7 PPA? https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes-python2.7
2.7.3 is pretty old, it seems like there's a good chance this could have been fixed since then.
from python-fitbit.
'import requests' gave an error, but I set-up an clean environemnt using virtualenv, and python-fitbit imports just fine.
Thanks for the answers!
------------
In [2]: import requests
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-686486c241c8> in <module>()
----> 1 import requests
/usr/local/lib/python2.7/dist-packages/requests/__init__.py in <module>()
56 pass
57
---> 58 from . import utils
59 from .models import Request, Response, PreparedRequest
60 from .api import request, get, head, post, patch, put, delete, options
/usr/local/lib/python2.7/dist-packages/requests/utils.py in <module>()
20
21 from . import __version__
---> 22 from . import certs
23 from .compat import parse_http_list as _parse_list_header
24 from .compat import quote, urlparse, bytes, str, OrderedDict, urlunparse
ImportError: cannot import name certs
In [3]:
from python-fitbit.
@jykim Can this issue be closed?
from python-fitbit.
I am a novice, and I am having trouble importing Fitbit library. Getting import errors with init.py and api.py. Running Python 2.7.11 on a Windows 10 machine. Funny thing is the import is working fine on a Windows 7 machine running Python 2.7.6. Any suggestions other than setting up virtualenv?
from python-fitbit.
Related Issues (20)
- Problems with Auth 2.0 HOT 3
- Help needed?
- How to get activity statistics by activity type when its started from the tracker?
- unable to get sleep summary data using time_series('sleep') HOT 2
- Source tarball on PyPi does not include tests or tox config
- Error trying to get heart data HOT 4
- Close Chrome tab after validating API HOT 3
- AttributeError: module 'fitbit' has no attribute 'Fitbit' HOT 1
- Works well Locally, but not Deployed
- Add multi-date functionality
- Force sync HOT 1
- wait_for_tstate_lock: ENGINE Waiting for thread Thread-4
- fitbit do not allow callback URLs with http anymore HOT 2
- Add lifetime stats, friends and badges API HOT 1
- [INFO] Repo not maintained anymore ? HOT 13
- Unable to establish connection with Fitbit API
- Exporting Breathing Rate Intraday by Date HOT 10
- urllib failure
- TCX endpoint decoding error error
- Download Skin Temperature and SpO2 data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-fitbit.