These are chat archives for nightscout/intend-to-bolus

27th
Oct 2015
eszcloud
@eszcloud
Oct 27 2015 00:16
I'm doing a fresh install of openaps and get an error during installation:
$ sudo easy_install -ZU openaps
Searching for openaps
Reading http://pypi.python.org/simple/openaps/
Best match: openaps 0.0.7
Downloading https://pypi.python.org/packages/2.7/o/openaps/openaps-0.0.7-py2.7.egg#md5=101bc7304ab092378bfe469d12005782
Processing openaps-0.0.7-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg
Extracting openaps-0.0.7-py2.7.egg to /usr/local/lib/python2.7/dist-packages
openaps 0.0.7 is already the active version in easy-install.pth
Installing openaps-install-udev-rules script to /usr/local/bin
Installing openaps-report script to /usr/local/bin
Installing openaps script to /usr/local/bin
Installing openaps-get script to /usr/local/bin
Installing openaps-vendor script to /usr/local/bin
Installing openaps-suggest script to /usr/local/bin
Installing openaps-use script to /usr/local/bin
Installing openaps-alias script to /usr/local/bin
Installing openaps-enact script to /usr/local/bin
Installing openaps-device script to /usr/local/bin
Installing git-openaps-init script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg
Processing dependencies for openaps
Searching for mock
Reading http://pypi.python.org/simple/mock/
Best match: mock 1.3.0
Downloading https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz#md5=73ee8a4afb3ff4da1b4afa287f39fdeb
Processing mock-1.3.0.tar.gz
Running mock-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mYxZWW/mock-1.3.0/egg-dist-tmp-pUGh_A
mock requires setuptools>=17.1. Aborting installation
error: Setup script exited with 1
Ali Mazaheri
@amazaheri
Oct 27 2015 00:17
I got that too
Ben West
@bewest
Oct 27 2015 00:17
sudo easy_install -ZU setuptools
then, sudo apt-get remove python-setuptools
Ali Mazaheri
@amazaheri
Oct 27 2015 00:17
after removing
it installed
the IOB issue is kicking my behind!
eszcloud
@eszcloud
Oct 27 2015 00:22
if I remove the python-setuptools, then easy_install won't work with openaps:
$ sudo easy_install -ZU openaps
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 2681, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found
Ben West
@bewest
Oct 27 2015 00:22
err
so
the order matters
  1. sudo apt-get install python-setuptools # get old version
1.sudo apt-get install python-setuptools # get old version
  1. sudo easy_install -ZU setuptools use setuptools to upgrade itself
  2. sudo apt-get remove python-setuptools remove old system version, but leaves the "locally" installed one from previous step
Scott Leibrand
@scottleibrand
Oct 27 2015 00:24
The apt-get remove is not necessary.
Ben West
@bewest
Oct 27 2015 00:25
I just set mine up and it was necessary on both machines
Scott Leibrand
@scottleibrand
Oct 27 2015 00:25
Are you on a Pi?
Ben West
@bewest
Oct 27 2015 00:25
yeah, one was a pi
I expect it to be necessary based on what I know about how python and packaging systems work, as well
Scott Leibrand
@scottleibrand
Oct 27 2015 00:26
if you follow the just-updated openaps/docs install with Raspbian Jessie it just does the -ZU setuptools and that is sufficient.
Ben West
@bewest
Oct 27 2015 00:26
ah, my pi is on wheezy
Scott Leibrand
@scottleibrand
Oct 27 2015 00:26
Ah k
we might need too update the setup script if we want to support wheezy
eszcloud
@eszcloud
Oct 27 2015 00:28
Hm. I'm getting the same error (ImportError: Entry point ('console_scripts', 'easy_install') not found) following bewest's order.
that should be in the gitbook but it's not updating.
Ben West
@bewest
Oct 27 2015 00:31
curl https://bootstrap.pypa.io/ez_setup.py | sudo python -
Scott Leibrand
@scottleibrand
Oct 27 2015 00:31
I want to test our documented steps if possible.
Rather than trying something new each time. :-)
if they don't work, we need to figure out why and what needs updated in them.
eszcloud
@eszcloud
Oct 27 2015 00:32
from @scottleibrand link I get the following errors using
curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash -
Ben West
@bewest
Oct 27 2015 00:33
| sudo bash -
eszcloud
@eszcloud
Oct 27 2015 00:33
Setting up nodejs-dev (0.6.19~dfsg1-6) ...
Setting up nodejs-legacy (0.6.19~dfsg1-6) ...
Setting up npm (1.1.4~dfsg-2) ...
Setting up watchdog (5.12-1) ...
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV in                                                 vocation.
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV in                                                 vocation.
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 2681, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found
Traceback (most recent call last):
  File "/usr/local/bin/openaps", line 4, in <module>
    import pkg_resources
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 3080, in <module>
    @_call_aside
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 3066, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 3093, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 651, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 952, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_res                                                 ources/__init__.py", line 839, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mock' distribution was not found and is                                                  required by openaps
Ben West
@bewest
Oct 27 2015 00:33
right
Scott Leibrand
@scottleibrand
Oct 27 2015 00:33
i removed the sudo on purpose
Ben West
@bewest
Oct 27 2015 00:33
that's what I get as well
on wheezy
Scott Leibrand
@scottleibrand
Oct 27 2015 00:33
it has sudo where necessary in the script.
Ok, so once you figure out the steps for wheezy we'll need to update the doc / script.
Ben West
@bewest
Oct 27 2015 00:35
I couldn't get that version of node to work
Scott Leibrand
@scottleibrand
Oct 27 2015 00:35
Or you can download Jessie. ;-)
eszcloud
@eszcloud
Oct 27 2015 00:35
fwiw, I'm running Jessie
Scott Leibrand
@scottleibrand
Oct 27 2015 00:35
I've tested that extensively.
hmm
wonder how you got into the bad state then
Ben West
@bewest
Oct 27 2015 00:36
ah, great, I think adafruit/heroku are hosting debs that give you updated node 4
right now though, you need setuptools I think
is it removed from apt?
do sudo easy_install -ZU setuptools again
eszcloud
@eszcloud
Oct 27 2015 00:37
$ sudo easy_install -ZU setuptools
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 2681, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found
Ben West
@bewest
Oct 27 2015 00:37
oo
hmm
curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python
eszcloud
@eszcloud
Oct 27 2015 00:38
that worked
Ben West
@bewest
Oct 27 2015 00:38
great
eszcloud
@eszcloud
Oct 27 2015 00:39
thanks!
Ben West
@bewest
Oct 27 2015 00:39
try sudo easy_install -ZU setuptools again
then do openaps
eszcloud
@eszcloud
Oct 27 2015 00:39
setuptools worked
Ben West
@bewest
Oct 27 2015 00:40
openaps should install ok now
eszcloud
@eszcloud
Oct 27 2015 00:41
problems with opeanps install:
Installed /usr/local/lib/python2.7/dist-packages/gitdb-0.6.4-py2.7-linux-armv7l.egg
Searching for smmap>=0.8.5
Reading https://pypi.python.org/simple/smmap/
Best match: smmap 0.9.0
Downloading https://pypi.python.org/packages/source/s/smmap/smmap-0.9.0.tar.gz#md5=d7932d5ace206bf4ae15198cf36fb6ab
Processing smmap-0.9.0.tar.gz
Writing /tmp/easy_install-MouVF1/smmap-0.9.0/setup.cfg
Running smmap-0.9.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-MouVF1/smmap-0.9.0/egg-dist-tmp-9dfWnp
creating /usr/local/lib/python2.7/dist-packages/smmap-0.9.0-py2.7.egg
Extracting smmap-0.9.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding smmap 0.9.0 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/smmap-0.9.0-py2.7.egg
Finished processing dependencies for openaps
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
worked when I ran it a second time...
Ben West
@bewest
Oct 27 2015 00:46
great
eszcloud
@eszcloud
Oct 27 2015 00:46
thanks for your help!
Ben West
@bewest
Oct 27 2015 00:46
openaps --version :-)
eszcloud
@eszcloud
Oct 27 2015 00:47
$ openaps --version
openaps 0.0.7
Ben West
@bewest
Oct 27 2015 00:47
nice
eszcloud
@eszcloud
Oct 27 2015 00:47
yeah
Ben West
@bewest
Oct 27 2015 00:48
maybe we skip the python-setuptools
and do that curl ez_setup.py instead
Scott Leibrand
@scottleibrand
Oct 27 2015 00:48
I wonder why that was necessary for @eszcloud and not for me when I did it yesterday
Ben West
@bewest
Oct 27 2015 00:49
it was needed for me on two boxes
it's same problem with both node and python
the distro's versions are too old
Scott Leibrand
@scottleibrand
Oct 27 2015 00:49
for me python was old, but not too old to update itself
Ben West
@bewest
Oct 27 2015 00:50
not python, but setuptools package
Scott Leibrand
@scottleibrand
Oct 27 2015 00:50
yeah, same
Ben West
@bewest
Oct 27 2015 00:50
the distro's version of python-setuptools is too old
oh
Scott Leibrand
@scottleibrand
Oct 27 2015 00:50
I was able to update it with -ZU setuptools
Ben West
@bewest
Oct 27 2015 00:50
I was too
Scott Leibrand
@scottleibrand
Oct 27 2015 00:50
never had to run that curl
Ben West
@bewest
Oct 27 2015 00:50
but even still, that creates a broken system
in my case I was able to tell apt to uninstall the distro's version
and in my case I was left with ...
hmmm
Scott Leibrand
@scottleibrand
Oct 27 2015 00:51
I'm not sure that uninstall is necessary, at least when everything else is done in the right order
Ben West
@bewest
Oct 27 2015 00:51
in one case at least I was left with working setuptools
it sets up a priority to use the system's sversion
eg in /usr/*
whereas the "outside" package managers like npm, easy_install, etc, those all go in /usr/local/*
when stuff runs, it'll often check both places
and depending on versions, how it was installed, phase of moon, it might get both or the wrong one, etc...
it'd be easier to skip python-setuptools altogether and just use the curl instead
it'll always work
and the version will actually be more reliable
Scott Leibrand
@scottleibrand
Oct 27 2015 00:56
ok, someone want to uninstall everything and test an updated copy of that script with that command instead of python-setuptools?
I'm out of Pi's to upgrade. :)
might do another one in a couple weeks after getting all this other stuff sorted, so I can make sure it all installs cleanly from scratch
eszcloud
@eszcloud
Oct 27 2015 01:01
I have a clean SD card which I could pop into my secondary pi here if that's helpful
Scott Leibrand
@scottleibrand
Oct 27 2015 01:02
yes, that would be
eszcloud
@eszcloud
Oct 27 2015 01:02
Give me a few minutes to put raspbian on it
and just tagged you in the PR: openaps/docs#23
Ben West
@bewest
Oct 27 2015 01:04
won't work
Scott Leibrand
@scottleibrand
Oct 27 2015 01:04
k, can you fix?
Ben West
@bewest
Oct 27 2015 01:05
curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python && \ should be
( curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python - ) && \
er
Scott Leibrand
@scottleibrand
Oct 27 2015 01:05
that shouldn't matter. no || involved
Dana Lewis
@danamlewis
Oct 27 2015 01:05
does anyone (or @jasoncalabrese, because I know you're playing pump switching) know offhand if Animas and Medtronic have a compatible site? Can't remember what kind of sites animas pumps use.
Ben West
@bewest
Oct 27 2015 01:05
there's an && involved, same deal
Scott Leibrand
@scottleibrand
Oct 27 2015 01:06
curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python should return true
just like all the lines before and after it that don't have ( )
Ben West
@bewest
Oct 27 2015 01:06
right, but the pipe
because it has a pipe
you can't then && after that
or || eithr
Scott Leibrand
@scottleibrand
Oct 27 2015 01:07
oh, gotcha
you're saying it'll pipe through python && everything-else
Tim Howard
@tghoward
Oct 27 2015 01:07
@danamlewis yes, we have both animas and medtronic. cartridges differ but the sites are compatible. At least the ones we are using
Ben West
@bewest
Oct 27 2015 01:07
right
need little subshell there
Dana Lewis
@danamlewis
Oct 27 2015 01:08
excellent thanks @tghoward ! Know which sites those are offhand? heard inset II, wondering if that's what you use or something else?
Scott Leibrand
@scottleibrand
Oct 27 2015 01:08
fixed
Ben West
@bewest
Oct 27 2015 01:08
nice
Scott Leibrand
@scottleibrand
Oct 27 2015 01:09
ok, ready for testing when your SD card is @eszcloud
Tim Howard
@tghoward
Oct 27 2015 01:09
we use Silhouette (minimed) and animus comfort short. Don't know about inset II
Dana Lewis
@danamlewis
Oct 27 2015 01:09
okie doke. Thanks again!
Ben West
@bewest
Oct 27 2015 01:09
I have 4 pis sitting here, 3 16G sd cards, and 1 4G sd card with noobs on it
eszcloud
@eszcloud
Oct 27 2015 01:10
@scottleibrand 80 % done writing the sd card
Ben West
@bewest
Oct 27 2015 01:10
blob
Scott Leibrand
@scottleibrand
Oct 27 2015 01:10
wow, what do you use to write them?
mine takes 30m to write jessie
eszcloud
@eszcloud
Oct 27 2015 01:11
I use win32diskImager
Scott Leibrand
@scottleibrand
Oct 27 2015 01:11
I mean hardware wise
I'm using my mac's SD card slot with an adapter
eszcloud
@eszcloud
Oct 27 2015 01:11
I pop it into the sd card reader on my laptop
Scott Leibrand
@scottleibrand
Oct 27 2015 01:12
huh
eszcloud
@eszcloud
Oct 27 2015 01:12
same
Scott Leibrand
@scottleibrand
Oct 27 2015 01:12
maybe dd is slow?
eszcloud
@eszcloud
Oct 27 2015 01:12
the nano-SD card is in the micro-SD card adapter
Scott Leibrand
@scottleibrand
Oct 27 2015 01:12
or maybe you have a higher-quality nano-SD
with higher write speeds
eszcloud
@eszcloud
Oct 27 2015 01:13
This one is the one from the canakit and is a SanDisk class 10
the write is complete
Scott Leibrand
@scottleibrand
Oct 27 2015 01:14
mine is a kingston 8GB from canakit that says SDC10/8GB on it
sounds like the same
how big was your image?
eszcloud
@eszcloud
Oct 27 2015 01:14
yep
Ben West
@bewest
Oct 27 2015 01:15
kingston 16G microSDHC Class 10
it was mid-price
eszcloud
@eszcloud
Oct 27 2015 01:15
The image was 3.05 GB
Scott Leibrand
@scottleibrand
Oct 27 2015 01:15
my .img file is 4325376000 bytes uncompressed
2015-09-24-raspbian-jessie.img
Ben West
@bewest
Oct 27 2015 01:15
we should make a repo and use travis/wercker to build the img
travis will give us an hour
eszcloud
@eszcloud
Oct 27 2015 01:16
3,276,800,000 bytes
Ben West
@bewest
Oct 27 2015 01:16
great
Scott Leibrand
@scottleibrand
Oct 27 2015 01:16
Ben West
@bewest
Oct 27 2015 01:16
want to divide the 16 into 3 parts maybe
maybe 4
have a backup/restore mechanism
separate /home from rest of syste
eszcloud
@eszcloud
Oct 27 2015 01:26
@scottleibrand Jessie is installed. I'm looking at the PR in which you tagged me. I see the changes that you've made. Newbie github question: How can I view the whole thing to get context?
Scott Leibrand
@scottleibrand
Oct 27 2015 01:29
go find the file in the branch:
well, which "whole thing" are you looking for?
the things we actually edited are the install scripts, and you can see the whole thing there just by clicking the little expansion icon between the line numbers
this is on the Files changed tab
eszcloud
@eszcloud
Oct 27 2015 01:31
I see that. I want to be sure that I don't inadvertently do something that isn't in the setup instructions there, so I'd like to be able to see where the install instructions start.
Scott Leibrand
@scottleibrand
Oct 27 2015 01:32
ah
that should be in the gitbook, but for some reason that's not updating
the pages we updated are here:
This message was deleted
eszcloud
@eszcloud
Oct 27 2015 01:33
excellent! off and running with the 2nd link
Scott Leibrand
@scottleibrand
Oct 27 2015 01:33
cool. let us know how it goes
Jason Calabrese
@jasoncalabrese
Oct 27 2015 01:35
@danamlewis @tghoward we still haven't haven't a site yet, but that was going to be Heidi's part of the project... we're using the inset 30 now, and would like to keep using it or something similar
eszcloud
@eszcloud
Oct 27 2015 01:35
when I do curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - the command line is returned without anything happening.
Scott Leibrand
@scottleibrand
Oct 27 2015 01:35
so you'll need to modify that slightly
replace master with python-setuptools
curl -s https://raw.githubusercontent.com/openaps/docs/python-setuptools/scripts/quick-packages.sh | bash -
although returning with no output sounds like another problem
eszcloud
@eszcloud
Oct 27 2015 01:36
Same result
Scott Leibrand
@scottleibrand
Oct 27 2015 01:36
do just curl -s https://raw.githubusercontent.com/openaps/docs/python-setuptools/scripts/quick-packages.sh
does it show you the same contents?
eszcloud
@eszcloud
Oct 27 2015 01:37
it returns the command line
Scott Leibrand
@scottleibrand
Oct 27 2015 01:37
show me?
Ben West
@bewest
Oct 27 2015 01:38
This message was deleted
eszcloud
@eszcloud
Oct 27 2015 01:39
pi@raspberrypi ~ $ curl -s https://raw.githubusercontent.com/openaps/docs/master                                                                                        /scripts/quick-packages.sh | bash -
pi@raspberrypi ~ $ ^C
pi@raspberrypi ~ $ curl -s https://raw.githubusercontent.com/openaps/docs/python                                                                                        -setuptools/scripts/quick-packages.sh | bash -
pi@raspberrypi ~ $ curl -s https://raw.githubusercontent.com/openaps/docs/python                                                                                        -setuptools/scripts/quick-packages.sh
Scott Leibrand
@scottleibrand
Oct 27 2015 01:39
you have extra spaces in there
eszcloud
@eszcloud
Oct 27 2015 01:39
hang on
eszcloud
@eszcloud
Oct 27 2015 01:40
trying that now
What am I missing?
pi@raspberrypi ~ $ curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash -
pi@raspberrypi ~ $ curl -s https://raw.githubusercontent.com/openaps/docs/python-setuptools/scripts/quick-packages.sh | bash -                                          pi@raspberrypi ~ $
The top line is what I had originally. Bottom line returns command line.
Scott Leibrand
@scottleibrand
Oct 27 2015 01:43
try it without the | bash - part
and make sure it gives you some output
do you have Internet yet?
eszcloud
@eszcloud
Oct 27 2015 01:43
good call!
ha!
Scott Leibrand
@scottleibrand
Oct 27 2015 01:44
heh
eszcloud
@eszcloud
Oct 27 2015 01:44
Yes indeed
Dana Lewis
@danamlewis
Oct 27 2015 01:55
@johnmales @ochenmiller ya'll ended up being the only two to give input to times re: mobile call, so guess we're not having one for a while!
eszcloud
@eszcloud
Oct 27 2015 02:03
curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - is currently running strong
Ben West
@bewest
Oct 27 2015 02:04
have it, doesn't need everyone :-)
eszcloud
@eszcloud
Oct 27 2015 02:05
I spoke too soon
Matthias Granberry
@mgranberry
Oct 27 2015 02:05
@danamlewis I'm pretty easy to work around. I figured I'd just show up. :)
Dana Lewis
@danamlewis
Oct 27 2015 02:05
@mgranberry :)
eszcloud
@eszcloud
Oct 27 2015 02:06
nodejs-legacy is already the newest version.
npm is already the newest version.
python is already the newest version.
python-dev is already the newest version.
python-numpy is already the newest version.
python-pip is already the newest version.
python-setuptools is already the newest version.
python-software-properties is already the newest version.
watchdog is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 2681, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found
bash: line 11: openaps: command not found
pi@raspberrypi ~ $
Scott Leibrand
@scottleibrand
Oct 27 2015 02:07
ok, time to try the commands one by one
probably start with curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python next
oh, wait a sec
if you haven't done that yet, do this first
eszcloud
@eszcloud
Oct 27 2015 02:08
haven't done that yet
Scott Leibrand
@scottleibrand
Oct 27 2015 02:08
sudo apt-get install -y git python python-dev python-software-properties python-numpy python-pip nodejs-legacy npm watchdog && echo true || echo false
eszcloud
@eszcloud
Oct 27 2015 02:09
that worked
Scott Leibrand
@scottleibrand
Oct 27 2015 02:09
did it return true or false?
eszcloud
@eszcloud
Oct 27 2015 02:09
true
Scott Leibrand
@scottleibrand
Oct 27 2015 02:09
ok, then chain it together with the next one, so:
sudo apt-get install -y git python python-dev python-software-properties python-numpy python-pip nodejs-legacy npm watchdog && \ ( curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python ) && echo true || echo false
eszcloud
@eszcloud
Oct 27 2015 02:10
that returned true
Scott Leibrand
@scottleibrand
Oct 27 2015 02:10
the && stuff is a boolean operator that does the thing after only if the thing before returned true
did it give any new output?
eszcloud
@eszcloud
Oct 27 2015 02:11
lots
Scott Leibrand
@scottleibrand
Oct 27 2015 02:12
hmm, odd that it didn't before
eszcloud
@eszcloud
Oct 27 2015 02:12
copying setuptools.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying setuptools.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying setuptools.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg   /EGG-INFO
copying setuptools.egg-info/entry_points.txt -> build/bdist.linux-armv7l/egg/EGG   -INFO
copying setuptools.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INF   O
copying setuptools.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-IN   FO
copying setuptools.egg-info/zip-safe -> build/bdist.linux-armv7l/egg/EGG-INFO
creating dist
creating 'dist/setuptools-18.4-py2.7.egg' and adding 'build/bdist.linux-armv7l/e   gg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing setuptools-18.4-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg' (and    everything under it)
Copying setuptools-18.4-py2.7.egg to /usr/local/lib/python2.7/dist-packages
setuptools 18.4 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg
Processing dependencies for setuptools==18.4
Finished processing dependencies for setuptools==18.4
true
Scott Leibrand
@scottleibrand
Oct 27 2015 02:12
last time there was nothing after 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. and
Traceback (most recent call last):
eszcloud
@eszcloud
Oct 27 2015 02:12
There's a lot more, too, above that.
Scott Leibrand
@scottleibrand
Oct 27 2015 02:13
try the original curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - again
it should go a lot faster with stuff already installed
oh, I bet I know what it was
eszcloud
@eszcloud
Oct 27 2015 02:14
still running...
Scott Leibrand
@scottleibrand
Oct 27 2015 02:15
hmm, no, my idea doesn't make sense
I originally had to separate out sudo easy_install -ZU setuptools from sudo easy_install -ZU openaps because they needed to run as separate commands
but we're already doing that...
maybe we don't need sudo easy_install -ZU setuptools at all though
eszcloud
@eszcloud
Oct 27 2015 02:18
new place with errors:
Adding gitdb 0.6.4 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/gitdb-0.6.4-py2.7-linux-armv7l.egg
Searching for smmap>=0.8.5
Reading https://pypi.python.org/simple/smmap/
Best match: smmap 0.9.0
Downloading https://pypi.python.org/packages/source/s/smmap/smmap-0.9.0.tar.gz#md5=d7932d5ace206bf4ae15198cf36fb6ab
Processing smmap-0.9.0.tar.gz
Writing /tmp/easy_install-hH6odd/smmap-0.9.0/setup.cfg
Running smmap-0.9.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hH6odd/smmap-0.9.0/egg-dist-tmp-wGJ_dm
creating /usr/local/lib/python2.7/dist-packages/smmap-0.9.0-py2.7.egg
Extracting smmap-0.9.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding smmap 0.9.0 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/smmap-0.9.0-py2.7.egg
Finished processing dependencies for openaps
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
installed /etc/udev/rules.d/80-medtronic-carelink.rules
installed /etc/udev/rules.d/80-dexcom.rules
Installing bash completion script /etc/bash_completion.d/python-argcomplete.sh
npm http GET https://registry.npmjs.org/json
npm http GET https://registry.npmjs.org/oref0

npm ERR! Error: failed to fetch from registry: oref0
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR!     at ClientRequest.g (events.js:156:14)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1256:7)
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /home/pi/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.18.11-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "json" "oref0"
npm ERR! cwd /home/pi
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: oref0
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm not ok
openaps 0.0.7
pi@raspberrypi ~ $
Scott Leibrand
@scottleibrand
Oct 27 2015 02:18
since it looks like https://bootstrap.pypa.io/ez_setup.py is getting the current version
so openaps installed, but not oref0
your npm is too old
I got:
pi@rpi3 ~/src/oref0 $ node -v
v0.10.29
pi@rpi3 ~/src/oref0 $ npm -v
1.4.21
eszcloud
@eszcloud
Oct 27 2015 02:20
pi@raspberrypi ~ $ node -v
v0.6.19
pi@raspberrypi ~ $ npm -v
1.1.4
Scott Leibrand
@scottleibrand
Oct 27 2015 02:21
yeah, those were in your error output. :)
eszcloud
@eszcloud
Oct 27 2015 02:21
true dat!
Scott Leibrand
@scottleibrand
Oct 27 2015 02:21
wonder why you're getting such older versions of everything
what does uname -a show?
Linux 3.18.11-v7+ ?
eszcloud
@eszcloud
Oct 27 2015 02:22
yes
Scott Leibrand
@scottleibrand
Oct 27 2015 02:22
pi@rpi3 ~/src/oref0 $ uname -a
Linux rpi3 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux
you sure that's jessie?
pi@rpi3 ~/src/oref0 $ grep jessie /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
eszcloud
@eszcloud
Oct 27 2015 02:24
The other pi I'm running where I used the same image of Raspbian yield
pi@cgmcloud3 ~/myopenaps $ uname -a
Linux cgmcloud3 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l GNU/Linux
Scott Leibrand
@scottleibrand
Oct 27 2015 02:24
pretty sure that's not the same image
grep raspbian /etc/apt/sources.list
eszcloud
@eszcloud
Oct 27 2015 02:27

pi@raspberrypi ~ $ grep raspbian /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
#deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
pi@raspberrypi ~ $
Scott Leibrand
@scottleibrand
Oct 27 2015 02:27
there you go. you're using wheezy, not jessie
eszcloud
@eszcloud
Oct 27 2015 02:27
That says Wheezy. This is so weird because every other time I've installed raspbian it's been Jessie, even when it was supposed to be Wheezy.
Scott Leibrand
@scottleibrand
Oct 27 2015 02:28
dunno. probably worth downloading a new image, though: https://www.raspberrypi.org/downloads/raspbian/
you can get npm upgraded, but it's probably not worth all the trouble
eszcloud
@eszcloud
Oct 27 2015 02:29
makes sense. much easier to wipe the card and install Jessie
Scott Leibrand
@scottleibrand
Oct 27 2015 02:32
ok, give it another shot with jessie when you get a chance, and let us know how it goes
I just updated the rpi.md to recommend Jessie or newer
eszcloud
@eszcloud
Oct 27 2015 02:39
Ok. Tried imaging the disk again and still get Wheezy. Downloading Jessie now. Will let you know how it goes.
Ben West
@bewest
Oct 27 2015 03:53
trying out resin.io now
could make installing this stuff a snap
John Males
@johnmales
Oct 27 2015 05:26
@danamlewis sorry I figured the call wasn't going ahead since I hadn't heard anything. Apologies if it did.
John Males
@johnmales
Oct 27 2015 05:41
oh dear, I have been using wheezy ...
John Males
@johnmales
Oct 27 2015 06:47
This looks like an interesting product - particularly if it can run Linux http://unlocked.newegg.com/review-kangaroo-mobile-windows-10-pc/
Ben West
@bewest
Oct 27 2015 07:19
much love for provenance/traceability
blob
John Males
@johnmales
Oct 27 2015 10:10
Hi @scottleibrand - tried your script on a fresh rPi2 install. It was installing for quite some time and then got to this:
Setting up node-normalize-package-data (0.2.2-1) ...
Setting up node-read (1.0.5-1) ...
Setting up node-read-package-json (1.2.4-1) ...
Setting up node-retry (0.6.0-1) ...
Setting up node-sha (1.2.3-1) ...
Setting up node-slide (1.1.4-1) ...
Setting up nodejs-legacy (0.10.29~dfsg-2) ...
Setting up npm (1.4.21+ds-2) ...
Setting up watchdog (5.14-3) ...
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Processing triggers for libc-bin (2.19-18+deb8u1) ...
Processing triggers for systemd (215-17+deb8u2) ...
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-18.4.zip
Traceback (most recent call last):
  File "<stdin>", line 391, in <module>
  File "<stdin>", line 387, in main
  File "<stdin>", line 332, in download_setuptools
  File "<stdin>", line 252, in download_file_curl
  File "<stdin>", line 207, in _clean_check
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['curl', 'https://pypi.python.org/packages/source/s/setuptools/setuptools-18.4.zip', '--silent', '--output', '/home/pi/setuptools-18.4.zip']' returned non-zero exit status 18
./setup.sh: line 12: openaps: command not found
John Males
@johnmales
Oct 27 2015 11:10
So I presume some sort of syntax error in the script. I then proceeded to check that watchdog was installed, which it was. I then ran the second part of the script:
#!/bin/bash

sudo easy_install -ZU setuptools && \
sudo easy_install -ZU openaps && \
sudo openaps-install-udev-rules && \
sudo activate-global-python-argcomplete && \
sudo npm install -g json oref0 && \
echo openaps installed
openaps --version
Scott Leibrand
@scottleibrand
Oct 27 2015 12:26
Odd. Looks like running the script twice would work, but it always errors out the first time. Wonder why.
diabeticgonewild
@diabeticgonewild
Oct 27 2015 12:53

@bewest , does #OpenAPS interface with MongoDB? I am just wondering because in lieu of SSHing between MATLAB and my Raspberry Pi, which will have #OpenAPS tools installed on it, MongoDB can be used with MATLAB's Database Toolbox

See: http://www.mathworks.com/products/database/features.html#working-with-mongodb

I believe this would be a more reliable option and interfacing feature compared to SSH, based on some firsthand experience from decoding JSON-based OpenAPS data in MATLAB.

However, I still have several (I mean several) hours of work, before I get to this point. If anyone else can answer this question, feel free to!

That being said, I have come a long ways with the work I have done. I just updated my GitHub page with this work: https://github.com/diabeticgonewild/Artificial-Pancreas-2015-Mathematical-Model
Scott Leibrand
@scottleibrand
Oct 27 2015 13:12
The openaps toolset could retrieve temp basal recommendations from anywhere you want with a very simple script.
Preferably that would be some sort of API: matlab could probably write out its recommendation as json on a web server somewhere for example.
diabeticgonewild
@diabeticgonewild
Oct 27 2015 13:13
Correct.
Scott Leibrand
@scottleibrand
Oct 27 2015 13:14
or you could have openaps upload its pumphistory and current status data to the Nightscout API, and then matlab could interface with that.
Lots of options.
diabeticgonewild
@diabeticgonewild
Oct 27 2015 13:15
I mean, it sounds like SSHing (one way from MATLAB to Pi AND one way from Pi to MATLAB, concurrently) sounds like the way to go.
Scott Leibrand
@scottleibrand
Oct 27 2015 13:15
No
diabeticgonewild
@diabeticgonewild
Oct 27 2015 13:15
Yeah, but too many points of failure...with respect to NS and Pi
Scott Leibrand
@scottleibrand
Oct 27 2015 13:15
ssh is better for interactive stuff.
You'll want a proper API. NS provides one, or you can make your own on the matlab server.
But NS would work with very little modification, so despite the dependencies it might be more straightforward.
diabeticgonewild
@diabeticgonewild
Oct 27 2015 13:16
Probably will start off first with NS, then make improvements via an API in MATLAB.
Scott Leibrand
@scottleibrand
Oct 27 2015 13:17
You don't have to use the NS GUI, but it has good APIs for accessing BG and pump data.
That would work.
diabeticgonewild
@diabeticgonewild
Oct 27 2015 13:18
I am just trying to "play stuff out", even though I have a long ways to go. I expect time remaining, with respect to work, is around 500 hours left, before I have it all running...
Like the 3 major parts of #VirtualPancreas. 1. Modeling 2. Controller and Simulation 3. Interfacing on the mobile scale
When you think of that, it's not that bad.
I expect 1. to be done, for sure, by the New Year....
So it's not that bad.
I mean, as long as I am on steroids I am not concerned about finishing it at all.
I have gotten to a point where I am a lot more comfortable with the material, and so I am not worried about "getting stuck" and just "quitting" or something.
Scott Leibrand
@scottleibrand
Oct 27 2015 13:21
Hope those keep working for you as well as they have been. :-)
diabeticgonewild
@diabeticgonewild
Oct 27 2015 13:21
Me too!
At least I have found a treatment that works well, relatively quickly...but it screws up blood sugars immediately too! But autoimmune autonomic nervous system failure is worse than diabetes, by far...
But thanks!!! :D
And yay! Just signed up for classes!
Ben West
@bewest
Oct 27 2015 16:50
blob
AdrianLxM
@AdrianLxM
Oct 27 2015 16:59
@diabeticgonewild, not knowing about OpenAP, but another "open loop" system has a bolus calculator for glucocorticosteroids. Worked like a charme. even with higher orthopedic doses (not knowing about MS doses). I never went over 120mg/dl the last time I used it.
Ben West
@bewest
Oct 27 2015 17:25
it definitely feels better waking up at 120
Dana Lewis
@danamlewis
Oct 27 2015 17:26
:) :) :)
Ben West
@bewest
Oct 27 2015 18:15
so overnight pi was success last night
was great
Chris Hannemann
@channemann
Oct 27 2015 18:16
+1
Scott Leibrand
@scottleibrand
Oct 27 2015 19:00
:-)
So when are we going to have 3,000 loopers?
Milos Kozak
@MilosKozak
Oct 27 2015 19:45
3000 pumps seems to be bigger problem :)
diabeticgonewild
@diabeticgonewild
Oct 27 2015 20:04
Nice @AdrianLxM ! I actually don't have MS! I have a demyelinating neuropathy condition though that affects my peripheral nervous system (NOT central) called chronic inflammatory demyelinating polyneuropathy. I also have (very rare) autoimmune autonomic ganglionopathy/neuropathy which was blamed on type 1 diabetes "complications" for 4 years, except that it was present, kind of insidiously at my t1d diagnosis 20 years ago, which kind of clued in to it not being "diabetes complications" after all. They believe the AAG caused the autoimmunity leading up to my type 1 diabetes diagnosis, which is both crazy and mind-blowing.
Also, thanks!
Ali Mazaheri
@amazaheri
Oct 27 2015 21:54
blob Nice!
Ben West
@bewest
Oct 27 2015 22:12
hehe
is that me?
looks like me
been weird today though
yeah, morning/overnight was awesome/incredible
blob
had to fix bug in treatments
that bolus was relatively big 6+ units
Ben West
@bewest
Oct 27 2015 22:18
over the air updating:
blob
Ali Mazaheri
@amazaheri
Oct 27 2015 22:22
:)
Tim Howard
@tghoward
Oct 27 2015 22:40
@amazaheri and @bewest - those awesome figs are from oref0 sending data right to Nightscout, right? Is it shipping up to Mongo and then the NS api takes over? Or is it sending data right to Azure? My impression is the latter because the 'ns-upload-entries' part of oref0 seems to talk about Azure passwords.
Ben West
@bewest
Oct 27 2015 22:41
it's using nightcout api
my api secret is in crontab as environment variable
and my site is in an extra config
not in git
in one case it's in extra config also
tool has a few different ways you can use it so you can take advantage of environment variable as well as passing it through the args
Tim Howard
@tghoward
Oct 27 2015 22:42
So, I'm in the middle of trying to follow nightscout setup and they start you out with mongo -- then azure ...
I'm just trying to figure out which steps aren't applicable here
Ben West
@bewest
Oct 27 2015 22:43
to set up nightscout, you need account on azure, github, and mongolab
if you have all the accounts and can sign in,
I can walk you through rest of it fairly easily, I have a hard time following some of the docs
Tim Howard
@tghoward
Oct 27 2015 22:45
I have two of those but didn't get to azure last night. I'll work on that now and check in with you if I make enough progress, thanks.
Ben West
@bewest
Oct 27 2015 22:46
I find just getting the accounts created with passwords and everything confirmed takes the longest
Ali Mazaheri
@amazaheri
Oct 27 2015 23:17
@tghoward I send you your Azure Pass 6 months free usage ($500 per month)
use the code to setup Azure
just PM me you github and url you want to use [yourappname].azurewebsites.net
Tim Howard
@tghoward
Oct 27 2015 23:17
@amazaheri excellent. I'm logged in already -- making progress, but still in the 30 day trial
Ali Mazaheri
@amazaheri
Oct 27 2015 23:18
I suggest using the code to create the subscription as migrating from trial to another subscription is pain
Tim Howard
@tghoward
Oct 27 2015 23:27
wow, cool, I'm all linked up to github/cgm-remote-monitor from azure.
Tim Howard
@tghoward
Oct 27 2015 23:35
Up and running! All blank as I've pushed no data, but it is there.
Toby Canning
@TC2013
Oct 27 2015 23:38
@amazaheri Can I also have a pass? 😀
Ali Mazaheri
@amazaheri
Oct 27 2015 23:46
for a nominal fee lol
yes
jk
Tim Howard
@tghoward
Oct 27 2015 23:49
drat - it gave me a second subscription instead of extending the trial. Now I need to wrestle with it to figure that one out! (didn't follow your suggestion correctly :smile: )
Ali Mazaheri
@amazaheri
Oct 27 2015 23:49
:)
better do it now vs later :)
u can still do it by calling support but its a pain
Tim Howard
@tghoward
Oct 27 2015 23:58
ugh. created a support request. What a pain, but it will get straightened out, I'm sure.