Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error trying to get glucose data #5

Open
dduugg opened this issue Jul 9, 2016 · 6 comments
Open

Error trying to get glucose data #5

dduugg opened this issue Jul 9, 2016 · 6 comments

Comments

@dduugg
Copy link

dduugg commented Jul 9, 2016

hi, i'm at this step, trying to get glucose data, but getting an error:

pi@raspberrypi:~/my_openaps $ openaps use cgm oref0_glucose --hours 2.0
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openxshareble/__init__.py", line 97, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
TypeError: run_mainloop_with() got an unexpected keyword argument 'quit_with_loop'
pi@raspberrypi:~/my_openaps $ openaps use cgm oref0_glucose --no-raw --hours 2.0
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openxshareble/__init__.py", line 97, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
TypeError: run_mainloop_with() got an unexpected keyword argument 'quit_with_loop'

i see a similar error was reported here: https://gitter.im/nightscout/intend-to-bolus?at=57001e1f76b6f9de194d85c3

Let me know if you have any suggestions. I'm using a G4 with Share.

@dduugg
Copy link
Author

dduugg commented Jul 13, 2016

I think the issue here is that

sudo pip install git+git://github.com/bewest/Adafruit_Python_BluefruitLE.git'#wip/bewest/custom-gatt-profile'

should be:

sudo pip install git+git://github.com/bewest/Adafruit_Python_BluefruitLE.git@wip/bewest/custom-gatt-profile

However, with that change, I'm getting a different error:

pi@raspberrypi:~/my_openaps $ openaps use cgm oref0_glucose  --hours 2.0
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openxshareble/__init__.py", line 97, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/usr/local/lib/python2.7/dist-packages/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
    self._return_code = target()
  File "/usr/local/lib/python2.7/dist-packages/openxshareble/__init__.py", line 93, in run
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/dexcom.py", line 402, in main
    iter_glucose = self.get_glucose_data(params, args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/dexcom.py", line 381, in get_glucose_data
    return itertools.takewhile(self.comparison, self.dexcom.iter_records('EGV_DATA'))
AttributeError: 'NoneType' object has no attribute 'iter_records'

@dramageek
Copy link

dramageek commented Aug 16, 2016

I was getting the same error from your first comment for every use command. Re-installing the adafruit library with your updated command worked somewhat- list_dexcom now returns a valid response. However, I still get the same error as you when trying for actual communication with the device.

@PieterGit
Copy link

same quit_with_loop error with raspberry pi3 and openaps 0.1.6-dev and bluez_5.23-2+b1_armhf.deb. What bluez version works?

scottleibrand pushed a commit to openaps/docs that referenced this issue Aug 28, 2016
* Update using-openaps-tools

I don't think G4 with Share is supported with current versions of Raspbian/BlueZ based on openaps/openxshareble#5

* Revert "Update using-openaps-tools"

This reverts commit 716f73d.

* Fix BluefruitLE install link and add note
@bschrag620
Copy link

I seem to be having same issue. Can find g4 with list_device but every other command has error ending with something similar to

AttributeError: 'NoneType' object has no attribute 'iter_records'

Setting the g4 up as wired and using the Medtronic vendor works but would prefer to have the Bluetooth working.

@PieterGit
Copy link

@bschrag620 : what country are you in? I found out that the "Dexcom G4 with share" is only available in the USA. I think the European G4's have bluetooth, but probably the EU firmware prevents them from working. They push the G5 in Europe and won't allow G4 with Share.

@jaylagorio
Copy link

jaylagorio commented Jan 16, 2017

Confirming US G4 with Share receiver doesn't work via Bluetooth on an Edison with Explorer board but in my case works fine over USB OTG. Misfiled an issue here: openaps/openaps#114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants