You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.
When I try to connect to xively using Python, I get a KeyError; not sure what I'm doing wrong or what that means? :/ I'm running Python 2.7.3 on my new BeagleBone Black rev. C.
Traceback (most recent call last):
File "datalogger.xively", line 14, in
api = xively.XivelyAPIClient(API_KEY)
File "/usr/local/lib/python2.7/dist-packages/xively/api.py", line 45, in init
self.client = self.client_class(key, use_ssl=use_ssl, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/xively/client.py", line 64, in init
xively.version, self.headers['User-Agent'])
KeyError: 'User-Agent'
How can I get around this?
The text was updated successfully, but these errors were encountered:
I've been doing some more research this evening, and it seems as if for some reason, my xively instance isn't getting a "User-Agent" string. I found that if I remove that part of the code in the client.py, it seems to work ok:
Hi all,
When I try to connect to xively using Python, I get a KeyError; not sure what I'm doing wrong or what that means? :/ I'm running Python 2.7.3 on my new BeagleBone Black rev. C.
The code I'm trying to use to connect, following the rPI documentation (https://xively.com/dev/tutorials/pi/):
!/usr/bin/python
import datetime
import requests
import xively
FEED_ID = 'my_id'
API_KEY = 'my_key'
api = xively.XivelyAPIClient(API_KEY)
Traceback (most recent call last):
File "datalogger.xively", line 14, in
api = xively.XivelyAPIClient(API_KEY)
File "/usr/local/lib/python2.7/dist-packages/xively/api.py", line 45, in init
self.client = self.client_class(key, use_ssl=use_ssl, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/xively/client.py", line 64, in init
xively.version, self.headers['User-Agent'])
KeyError: 'User-Agent'
How can I get around this?
The text was updated successfully, but these errors were encountered: