Closed nyco007 closed 7 years ago
The first exception happens when Polar hangs up on the socket (it can do that if we don't authenticate within a certain period for example).
The second is more concerning because it's apparently an incompatibility with the version of OpenSSL you have (or a bug). Could you do a "pip freeze" with your virtual env activated and let me know what version of pyOpenSSL you have?
Hi markwal,
here is the result of pip freeze:
nyco007@beaglebone:~$ pip freeze Adafruit-BBIO==1.0.3 argh==0.26.2 asn1crypto==0.22.0 astroid==1.2.1 awesome-slugify==1.6.5 Babel==2.4.0 backports.ssl-match-hostname==3.5.0.1 blinker==1.3 certifi==2017.4.17 cffi==0.8.6 chainmap==1.0.2 chardet==3.0.4 click==6.2 colorama==0.3.2 cryptography==0.6.1 enum34==1.1.6 feedparser==5.2.1 Flask==0.10.1 Flask-Assets==0.10 Flask-Babel==0.9 Flask-Login==0.2.11 Flask-Principal==0.3.5 future==0.15.2 html5lib==0.999 idna==2.5 ipaddress==1.0.18 itsdangerous==0.24 iw-parse==0.0.2 Jinja2==2.8.1 logilab-common==0.62.0 Markdown==2.6.8 MarkupSafe==0.23 netaddr==0.7.19 netifaces==0.10.6 OctoPrint==1.3.4 OctoPrint-Fullscreen==0.0.3 OctoPrint-PolarCloud==0.1.0b0 olefile==0.44 pathtools==0.1.2 Pillow==4.1.1 pkginfo==1.2.1 ply==3.4 psutil==3.2.2 pyasn1==0.1.7 PyBBIO==0.10 pycparser==2.17 pygobject==3.14.0 pyinotify==0.9.4 pylint==1.3.1 pylru==1.0.9 pyOpenSSL==0.14 pyserial==2.7 python-dateutil==2.6.0 pytz==2017.2 PyYAML==3.10 regex==2017.6.23 requests==2.7.0 rsa==3.2.3 sarge==0.1.4 scandir==1.3 semantic-version==2.4.2 serbus==1.0.5 six==1.10.0 socketIO-client==0.7.2 sockjs-tornado==1.0.3 speaklater==1.3 tornado==4.0.2 Unidecode==0.4.20 urllib3==1.21.1 virtualenv==15.1.0 watchdog==0.8.3 webassets==0.12.1 websocket-client==0.40.0 Werkzeug==0.8.3
Hmmm... yes, pyOpenSSL 0.14 is likely too old. I removed the minimum version check because it caused problems with the particular OpenSSL installed in octopi 0.13 and removed the dependency that was causing problems with its version of OpenSSL (dump_publickey)
Are you able to upgrade OpenSSL:
pip install --upgrade pyOpenSSL
?
Unfortunaly no... The Polar Plugin also is not shown anymore at OctoPrint plugins. If i try to reinstall, it work, but it remain not showing up.... but here is re result of trying to upgrade pyOpenSSL:
nyco007@beaglebone:~/OctoPrint$ sudo pip install --upgrade pyOpenSSL
Collecting pyOpenSSL
Using cached pyOpenSSL-17.0.0-py2.py3-none-any.whl
Requirement already up-to-date: six>=1.5.2 in /usr/local/lib/python2.7/dist-packages (from pyOpenSSL)
Collecting cryptography>=1.7 (from pyOpenSSL)
Using cached cryptography-1.9.tar.gz
Requirement already up-to-date: idna>=2.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: cffi>=1.7 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.7->cryptography>=1.7->pyOpenSSL)
Building wheels for collected packages: cryptography
Running setup.py bdist_wheel for cryptography ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-nQ3Y3r/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpwmIEASpip-wheel- --python-tag cp27:
Traceback (most recent call last):
File "
Failed building wheel for cryptography
Running setup.py clean for cryptography
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-nQ3Y3r/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" clean --all:
Traceback (most recent call last):
File "
Failed cleaning build dir for cryptography
Failed to build cryptography
Installing collected packages: cryptography, pyOpenSSL
Found existing installation: cryptography 0.6.1
Uninstalling cryptography-0.6.1:
Successfully uninstalled cryptography-0.6.1
Running setup.py install for cryptography ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-nQ3Y3r/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-Qj3X_4-record/install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File "
----------------------------------------
Rolling back uninstall of cryptography Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-nQ3Y3r/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-Qj3X_4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nQ3Y3r/cryptography/
Oh man, the debian packages are too old and the pypi packages don't build, sigh...
It looks like from the logs that the uninstall of cffi that you mentioned in the other issue didn't remove cffi completely (version mismatch message above, it's still picking up 0.8.6)
You may want to do the uninstall thing again and then delete that file: /usr/lib/python2.7/dist-packages/_cffi_backend.arm-linux-gnueabihf.so
And then reinstall using apt-get:
sudo apt-get install python-cffi python-cryptography python-openssl
I think at that point, you'll still be getting the original message (but maybe that's also because it's finding the older cffi?) If so, then you might try to do the pip install --upgrade pyOpenSSL and see if it fails in a different place (instead of choking on the cffi version mismatch).
Okay, i uninstalled cffi again (sudo apt-get remove python-cffi) , checked if the file /usr/lib/python2.7/dist-packages/_cffi_backend.arm-linux-gnueabihf.so is there and it wasn't... so i did a pip freeze and ironical there is also showing up cffi==1.10.0..? Is it possible that I've got two versions of cffi installed? If yes, how do I deinstall the other version?
However I reinstalled using sudo apt-get install python-cffi python-cryptography python-openssl
Now the Plugin shows up again in Octoprint UI.
Nevertheless doing pip install --upgrade pyOpenSSL shows the same error or it seems like this:
nyco007@beaglebone:~/OctoPrint$ sudo pip install --upgrade pyOpenSSL
Collecting pyOpenSSL
Using cached pyOpenSSL-17.0.0-py2.py3-none-any.whl
Requirement already up-to-date: six>=1.5.2 in /usr/local/lib/python2.7/dist-packages (from pyOpenSSL)
Collecting cryptography>=1.7 (from pyOpenSSL)
Using cached cryptography-1.9.tar.gz
Requirement already up-to-date: idna>=2.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.7->pyOpenSSL)
Collecting cffi>=1.7 (from cryptography>=1.7->pyOpenSSL)
Requirement already up-to-date: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.7->cryptography>=1.7->pyOpenSSL)
Building wheels for collected packages: cryptography
Running setup.py bdist_wheel for cryptography ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-Rkqz5C/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpckDb2fpip-wheel- --python-tag cp27:
Traceback (most recent call last):
File "
Failed building wheel for cryptography
Running setup.py clean for cryptography
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-Rkqz5C/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" clean --all:
Traceback (most recent call last):
File "
Failed cleaning build dir for cryptography
Failed to build cryptography
Installing collected packages: cffi, cryptography, pyOpenSSL
Found existing installation: cffi 0.8.6
Uninstalling cffi-0.8.6:
Successfully uninstalled cffi-0.8.6
Found existing installation: cryptography 0.6.1
Uninstalling cryptography-0.6.1:
Successfully uninstalled cryptography-0.6.1
Running setup.py install for cryptography ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-Rkqz5C/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-4vXgfS-record/install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File "
----------------------------------------
Rolling back uninstall of cryptography Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-Rkqz5C/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-4vXgfS-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Rkqz5C/cryptography/
Hmmm... So far, I'm stumped. I think somehow the sequence is leaving you or giving you two different versions of cffi that can't coexist.
Hmm, can you recommend an actual guidance how to set up octoprint and mjpg streamer on a Beagle Bone Black? (maybe with an recommended image to flash on). Then I would try setting up everything again from new. The guidance that i've found aren't actual anymore and are not working at every part, so i had to mix them up to get Octoprint and mjpg streamer working.
I'll give it a whirl, but might take me a bit to get to it.
I have some BBBs about. (Gosh, one still has the old Angstrom OS that TI used to support. Looks like a good candidate for an upgrade.)
Using a newer BBB image I can get past cffi and pyOpenSSL issues but hit a problem with Pillow....
I included python-smbus as, I seem to recall, it pulls in the cffi stuff.
I then proceeded with the Octoprint setup. It went fine. But when I then installed, via the Octoprint UI, the Polar Cloud plugin, there was difficulty with Pillow. Lengthy log of the Polar Cloud plugin install follows.
Requirement already satisfied: pyopenssl in /usr/lib/python2.7/dist-packages (from OctoPrint-PolarCloud==0.1.0Beta)
Installing plugin "PolarCloud (Beta)" from https://github.com/markwal/OctoPrint-PolarCloud/archive/master.zip...
/usr/bin/python2 -m pip install https://github.com/markwal/OctoPrint-PolarCloud/archive/master.zip --user
Collecting https://github.com/markwal/OctoPrint-PolarCloud/archive/master.zip
Downloading https://github.com/markwal/OctoPrint-PolarCloud/archive/master.zip
Requirement already satisfied: OctoPrint in /usr/local/lib/python2.7/dist-packages/OctoPrint-1.3.4-py2.7.egg (from OctoPrint-PolarCloud==0.1.0Beta)
Collecting SocketIO-client (from OctoPrint-PolarCloud==0.1.0Beta)
Downloading socketIO-client-0.7.2.tar.gz
Requirement already satisfied: pyopenssl in /usr/lib/python2.7/dist-packages (from OctoPrint-PolarCloud==0.1.0Beta)
Collecting Pillow (from OctoPrint-PolarCloud==0.1.0Beta)
Downloading Pillow-4.2.0.tar.gz (12.7MB)
Requirement already satisfied: flask<0.11,>=0.9 in /usr/lib/python2.7/dist-packages (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Jinja2<2.9,>=2.8 in /usr/local/lib/python2.7/dist-packages/Jinja2-2.8.1-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: werkzeug<0.9,>=0.8.3 in /usr/local/lib/python2.7/dist-packages/Werkzeug-0.8.3-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: tornado==4.0.2 in /usr/local/lib/python2.7/dist-packages/tornado-4.0.2-py2.7-linux-armv7l.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: sockjs-tornado<1.1,>=1.0.2 in /usr/local/lib/python2.7/dist-packages/sockjs_tornado-1.0.3-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: PyYAML<3.11,>=3.10 in /usr/local/lib/python2.7/dist-packages/PyYAML-3.10-py2.7-linux-armv7l.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Flask-Login<0.3,>=0.2.2 in /usr/local/lib/python2.7/dist-packages/Flask_Login-0.2.11-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Flask-Principal<0.4,>=0.3.5 in /usr/local/lib/python2.7/dist-packages/Flask_Principal-0.3.5-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Flask-Babel<0.10,>=0.9 in /usr/local/lib/python2.7/dist-packages/Flask_Babel-0.9-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Flask-Assets<0.11,>=0.10 in /usr/local/lib/python2.7/dist-packages/Flask_Assets-0.10-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: markdown<2.7,>=2.6.4 in /usr/local/lib/python2.7/dist-packages/Markdown-2.6.8-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: pyserial<2.8,>=2.7 in /usr/local/lib/python2.7/dist-packages/pyserial-2.7-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: netaddr<0.8,>=0.7.17 in /usr/local/lib/python2.7/dist-packages/netaddr-0.7.19-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: watchdog<0.9,>=0.8.3 in /usr/local/lib/python2.7/dist-packages/watchdog-0.8.3-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: sarge<0.2,>=0.1.4 in /usr/local/lib/python2.7/dist-packages/sarge-0.1.4-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: netifaces<0.11,>=0.10 in /usr/local/lib/python2.7/dist-packages/netifaces-0.10.6-py2.7-linux-armv7l.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: pylru<1.1,>=1.0.9 in /usr/local/lib/python2.7/dist-packages/pylru-1.0.9-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: rsa<3.3,>=3.2 in /usr/local/lib/python2.7/dist-packages/rsa-3.2.3-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: pkginfo<1.3,>=1.2.1 in /usr/local/lib/python2.7/dist-packages/pkginfo-1.2.1-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: requests<2.8,>=2.7 in /usr/local/lib/python2.7/dist-packages/requests-2.7.0-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: semantic_version<2.5,>=2.4.2 in /usr/local/lib/python2.7/dist-packages/semantic_version-2.4.2-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: psutil<3.3,>=3.2.1 in /usr/local/lib/python2.7/dist-packages/psutil-3.2.2-py2.7-linux-armv7l.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Click<6.3,>=6.2 in /usr/local/lib/python2.7/dist-packages/click-6.2-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: awesome-slugify<1.7,>=1.6.5 in /usr/local/lib/python2.7/dist-packages/awesome_slugify-1.6.5-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: feedparser<5.3,>=5.2.1 in /usr/local/lib/python2.7/dist-packages/feedparser-5.2.1-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: chainmap<1.1,>=1.0.2 in /usr/local/lib/python2.7/dist-packages/chainmap-1.0.2-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: future<0.16,>=0.15 in /usr/local/lib/python2.7/dist-packages/future-0.15.2-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: scandir<1.4,>=1.3 in /usr/local/lib/python2.7/dist-packages/scandir-1.3-py2.7-linux-armv7l.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: websocket-client<0.41,>=0.40 in /usr/local/lib/python2.7/dist-packages/websocket_client-0.40.0-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: python-dateutil<2.7,>=2.6 in /usr/local/lib/python2.7/dist-packages/python_dateutil-2.6.0-py2.7.egg (from OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from SocketIO-client->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: cryptography>=0.2.1 in /usr/lib/python2.7/dist-packages (from pyopenssl->OctoPrint-PolarCloud==0.1.0Beta)
Collecting olefile (from Pillow->OctoPrint-PolarCloud==0.1.0Beta)
Downloading olefile-0.44.zip (74kB)
Requirement already satisfied: itsdangerous>=0.21 in /usr/lib/python2.7/dist-packages (from flask<0.11,>=0.9->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: MarkupSafe in /usr/lib/python2.7/dist-packages (from Jinja2<2.9,>=2.8->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: certifi in /usr/local/lib/python2.7/dist-packages/certifi-2017.04.17-py2.7.egg (from tornado==4.0.2->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: backports.ssl_match_hostname in /usr/local/lib/python2.7/dist-packages/backports.ssl_match_hostname-3.5.0.1-py2.7.egg (from tornado==4.0.2->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: blinker in /usr/lib/python2.7/dist-packages (from Flask-Principal<0.4,>=0.3.5->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Babel>=1.0 in /usr/local/lib/python2.7/dist-packages/Babel-2.4.0-py2.7.egg (from Flask-Babel<0.10,>=0.9->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: speaklater>=1.2 in /usr/local/lib/python2.7/dist-packages/speaklater-1.3-py2.7.egg (from Flask-Babel<0.10,>=0.9->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: webassets>=0.10 in /usr/local/lib/python2.7/dist-packages/webassets-0.12.1-py2.7.egg (from Flask-Assets<0.11,>=0.10->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: argh>=0.24.1 in /usr/local/lib/python2.7/dist-packages/argh-0.26.2-py2.7.egg (from watchdog<0.9,>=0.8.3->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: pathtools>=0.1.1 in /usr/local/lib/python2.7/dist-packages/pathtools-0.1.2-py2.7.egg (from watchdog<0.9,>=0.8.3->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: pyasn1>=0.1.3 in /usr/lib/python2.7/dist-packages (from rsa<3.3,>=3.2->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: regex in /usr/local/lib/python2.7/dist-packages/regex-2017.06.23-py2.7-linux-armv7l.egg (from awesome-slugify<1.7,>=1.6.5->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: Unidecode<0.05,>=0.04.14 in /usr/local/lib/python2.7/dist-packages/Unidecode-0.04.21-py2.7.egg (from awesome-slugify<1.7,>=1.6.5->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: cffi>=0.8 in /usr/lib/python2.7/dist-packages (from cryptography>=0.2.1->pyopenssl->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: pytz>=0a in /usr/local/lib/python2.7/dist-packages/pytz-2017.2-py2.7.egg (from Babel>=1.0->Flask-Babel<0.10,>=0.9->OctoPrint->OctoPrint-PolarCloud==0.1.0Beta)
Requirement already satisfied: pycparser in /usr/lib/python2.7/dist-packages (from cffi>=0.8->cryptography>=0.2.1->pyopenssl->OctoPrint-PolarCloud==0.1.0Beta)
Building wheels for collected packages: SocketIO-client, Pillow, olefile
Running setup.py bdist_wheel for SocketIO-client: started
Running setup.py bdist_wheel for SocketIO-client: finished with status 'done'
Stored in directory: /home/pi/.cache/pip/wheels/98/7d/12/0804f14e963d5e5d59d0a2825ce60a71064144360e28f815e1
Running setup.py bdist_wheel for Pillow: started
Running setup.py bdist_wheel for Pillow: finished with status 'error'
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lJib_J/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpARTr46pip-wheel- --python-tag cp27:
Single threaded build, not installing mp_compile:1 processes
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FontFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ExifTags.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageSequence.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImagePalette.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GimpGradientFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GifImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PaletteFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImagePath.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TiffTags.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/JpegPresets.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageDraw.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/BdfFontFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageShow.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FliImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageMorph.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/SunImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/OleFileIO.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageFilter.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/CurImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PcfFontFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PngImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageMath.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageChops.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageColor.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PyAccess.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageOps.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageStat.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ContainerIO.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/_util.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GdImageFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/_binary.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageCms.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/_tkinter_finder.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageFont.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageMode.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TarIO.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageQt.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/features.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/WalImageFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageTk.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/version.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/Image.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageWin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageTransform.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/__init__.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MspImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageGrab.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PSDraw.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MicImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageDraw2.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageEnhance.py -> build/lib.linux-armv7l-2.7/PIL
running egg_info
writing requirements to Pillow.egg-info/requires.txt
writing Pillow.egg-info/PKG-INFO
writing top-level names to Pillow.egg-info/top_level.txt
writing dependency_links to Pillow.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis/*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
writing manifest file 'Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lJib_J/Pillow/setup.py", line 788, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
Running setup.py clean for Pillow
Failed building wheel for Pillow
Running setup.py bdist_wheel for olefile: started
Running setup.py bdist_wheel for olefile: finished with status 'done'
Stored in directory: /home/pi/.cache/pip/wheels/20/58/49/cc7bd00345397059149a10b0259ef38b867935ea2ecff99a9b
Successfully built SocketIO-client olefile
Failed to build Pillow
Installing collected packages: SocketIO-client, olefile, Pillow, OctoPrint-PolarCloud
Running setup.py install for Pillow: started
Running setup.py install for Pillow: finished with status 'error'
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lJib_J/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-Obbxhq-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
Single threaded build, not installing mp_compile:1 processes
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FontFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ExifTags.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageSequence.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImagePalette.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GimpGradientFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GifImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PaletteFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImagePath.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TiffTags.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/JpegPresets.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageDraw.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/BdfFontFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageShow.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FliImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageMorph.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/SunImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/OleFileIO.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageFilter.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/CurImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PcfFontFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PngImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageMath.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageChops.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageColor.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PyAccess.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageOps.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageStat.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ContainerIO.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/_util.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/GdImageFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/_binary.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageCms.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/_tkinter_finder.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageFont.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageMode.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/TarIO.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageQt.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/features.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/WalImageFile.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageTk.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/version.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/Image.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageWin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageTransform.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/__init__.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MspImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageGrab.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PSDraw.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/MicImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageDraw2.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
copying PIL/ImageEnhance.py -> build/lib.linux-armv7l-2.7/PIL
running egg_info
writing requirements to Pillow.egg-info/requires.txt
writing Pillow.egg-info/PKG-INFO
writing top-level names to Pillow.egg-info/top_level.txt
writing dependency_links to Pillow.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis/*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
writing manifest file 'Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lJib_J/Pillow/setup.py", line 788, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lJib_J/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-Obbxhq-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-lJib_J/Pillow/
Error!
Could not parse output from pip, see plugin_pluginmanager_console.log for generated output
The Pillow failure may relate to my not doing
sudo apt install gstreamer1.0-tools libx264-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
Success...
zlib headers or library files missing.... cannot build Pillow
sudo apt-get install zlib1g-dev
After which
The headers or library files could not be found for jpeg,
And thus
sudo apt-get install zlib1g-dev libjpeg-dev python-libtiff libfreetype6-dev liblcms2-dev libwebp-dev tcl-dev tk-dev libopenjpeg-dev
sudo pip install Pillow
After the above, I was then able to install the plugin and register with the Polar Cloud!
So, to summarize for a Beagle Bone Black
Download and flash to the BBB bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb
Note that the default account/password is debian/temppwd.
Before installing Octoprint and the Polar Cloud plugin, do
sudo apt-get update
sudo apt-get install build-essential python-dev python-setuptools python-pip \
python-smbus gstreamer1.0-tools libx264-dev gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
zlib1g-dev libjpeg-dev python-libtiff libfreetype6-dev \
liblcms2-dev libwebp-dev tcl-dev tk-dev libopenjpeg-dev
sudo pip install pyOpenSSL
sudo pip install Pillow
Follow the Octoprint for BBB directions at Setup-BeagleBone-Black-Rev-C-(Jessie)
Nice! Thanks @dnewman-polar3d
Ok guys, firstly many thank for your help. I've just reflashed debian and installed OctoPrint, mjpg-streamer and even the installation of Polar Cloud went without problems! BUT...I still have some problems, the printer keeps remaining offline after connecting it to Polar Cloud:
2017-07-04 01:17:05,318 - octoprint.plugins.polarcloud - INFO - Can't register because unable to communicate with Polar Cloud 2017-07-04 01:17:45,616 - octoprint.plugins.polarcloud - INFO - emit register 2017-07-04 01:17:47,390 - octoprint.plugins.polarcloud - WARNING - unable to create socket to Polar Cloud, check again in 1.95154827102 seconds 2017-07-04 01:17:53,541 - octoprint.plugins.polarcloud - ERROR - polar_heartbeat exception Traceback (most recent call last): File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 432, in _wait_and_process task() File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 660, in _hello 'signature': base64.b64encode(crypto.sign(self._key, self._challenge, b'sha256')), File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 2092, in sign _lib.EVP_SignUpdate(md_ctx, data, len(data)) TypeError: initializer for ctype 'void ' must be a cdata pointer, not unicode 2017-07-04 01:19:02,254 - octoprint.plugins.polarcloud - INFO - Socket disconnected, clear and restart 2017-07-04 01:19:02,264 - octoprint.plugins.polarcloud - WARNING - unable to create socket to Polar Cloud, check again in 1.66307886033 seconds 2017-07-04 01:19:07,307 - octoprint.plugins.polarcloud - ERROR - polar_heartbeat exception Traceback (most recent call last): File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 432, in _wait_and_process task() File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 660, in _hello 'signature': base64.b64encode(crypto.sign(self._key, self._challenge, b'sha256')), File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 2092, in sign _lib.EVP_SignUpdate(md_ctx, data, len(data)) TypeError: initializer for ctype 'void ' must be a cdata pointer, not unicode 2017-07-04 01:20:08,922 - octoprint.plugins.polarcloud - INFO - Socket disconnected, clear and restart 2017-07-04 01:20:08,928 - octoprint.plugins.polarcloud - WARNING - unable to create socket to Polar Cloud, check again in 2.55961905241 seconds 2017-07-04 01:20:14,919 - octoprint.plugins.polarcloud - ERROR - polar_heartbeat exception Traceback (most recent call last): File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 432, in _wait_and_process task() File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 660, in _hello 'signature': base64.b64encode(crypto.sign(self._key, self._challenge, b'sha256')), File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 2092, in sign _lib.EVP_SignUpdate(md_ctx, data, len(data)) TypeError: initializer for ctype 'void ' must be a cdata pointer, not unicode 2017-07-04 01:21:21,558 - octoprint.plugins.polarcloud - INFO - Socket disconnected, clear and restart 2017-07-04 01:21:21,567 - octoprint.plugins.polarcloud - WARNING - unable to create socket to Polar Cloud, check again in 1.60381588858 seconds 2017-07-04 01:21:26,786 - octoprint.plugins.polarcloud - ERROR - polar_heartbeat exception Traceback (most recent call last): File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 432, in _wait_and_process task() File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 660, in _hello 'signature': base64.b64encode(crypto.sign(self._key, self._challenge, b'sha256')), File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 2092, in sign _lib.EVP_SignUpdate(md_ctx, data, len(data)) TypeError: initializer for ctype 'void ' must be a cdata pointer, not unicode
Things are connecting to the Polar Cloud. However, you still have issues with the crypto libraries and when the plugin attempts to use them, it gets an exception and the connection is then closed. Did you do all the steps I indicated in the order I indicated? Before installing Octoprint there was a long list of other things to install first. And you need to install Octoprint from github and build it (as opposed to finding a debian package with it already built). That document I referenced earlier has those directions.
Actually, you may not be connecting -- I may have misinterpreted part of the log. But clearly, there's an issue with the crypto libraries and that's your underlying problem.
I've followed your instructions which you have summarized: Download and flash to the BBB bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb
Note that the default account/password is debian/temppwd.
Before installing Octoprint and the Polar Cloud plugin, do
sudo apt-get update sudo apt-get install build-essential python-dev python-setuptools python-pip \ python-smbus gstreamer1.0-tools libx264-dev gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ zlib1g-dev libjpeg-dev python-libtiff libfreetype6-dev \ liblcms2-dev libwebp-dev tcl-dev tk-dev libopenjpeg-dev sudo pip install pyOpenSSL sudo pip install Pillow Follow the Octoprint for BBB directions at Setup-BeagleBone-Black-Rev-C-(Jessie)
I have a theory on this. It may be related to your default locale. On my, I believe I'm using a en_US.UTF-8 and I think that's the automatic encoding for the the challenge. I think we shouldn't be leaving it to the users settings though since we really just want to use it as a string of bytes. Unfortunately, SocketIO is giving it back to use as unicode regardless of its form over the wire. So I think what I want to do is translate it to str via unicode.encode('utf-8'). I'm trying that out now and I'll push it to master soon.
@nyco007 what do you think? Plausible that you're using a non utf-8 default locale?
I recognized that when doing sudo pip install pyOpenSSL, the system says: debian@beaglebone:~$ sudo pip install pyOpenSSL Requirement already satisfied: pyOpenSSL in /usr/lib/python2.7/dist-packages Requirement already satisfied: cryptography>=0.2.1 in /usr/lib/python2.7/dist-packages (from pyOpenSSL) Requirement already satisfied: six>=1.5.2 in /usr/lib/python2.7/dist-packages (from pyOpenSSL) Requirement already satisfied: cffi>=0.8 in /usr/lib/python2.7/dist-packages (from cryptography>=0.2.1->pyOpenSSL) Requirement already satisfied: pycparser in /usr/lib/python2.7/dist-packages (from cffi>=0.8->cryptography>=0.2.1->pyOpenSSL)
Is that okay/wanted?
@markwal I can't tell you because I don't even know what that is ;D How can I find out or even change that?
Maybe you could update the plugin to 0.2.5 and try again?
To do that, go to OctoPrint->Settings->Software Update->Check for Updates now. If it isn't picking up 0.2.5, click on "Advanced" at the bottom of Software Update and choose "Force Check..."
Hang on. 0.2.5. doesn't have the fix. :-(
I gave @dnewman-polar3d summarized instructions a new try...(format SD card, resize it after flashing and then do following instructions)...somehow it works now. Many thank for your help also to @markwal !
So, to summarize for a Beagle Bone Black
Download and flash to the BBB bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb
Note that the default account/password is debian/temppwd.
Before installing Octoprint and the Polar Cloud plugin, do
sudo apt-get update sudo apt-get install build-essential python-dev python-setuptools python-pip \ python-smbus gstreamer1.0-tools libx264-dev gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ zlib1g-dev libjpeg-dev python-libtiff libfreetype6-dev \ liblcms2-dev libwebp-dev tcl-dev tk-dev libopenjpeg-dev sudo pip install pyOpenSSL sudo pip install Pillow
Follow the Octoprint for BBB directions at Setup-BeagleBone-Black-Rev-C-(Jessie)
OK. Thanks.
I registered OctoPrint to Polar Cloud and the Printer also shows up in Polar Cloud but its status is offline. I also recognized some failure reports on the command line of OctoPrint:
2017-06-28 00:39:38,827 - octoprint.plugins.polarcloud - ERROR - polar_heartbeat exception Traceback (most recent call last): File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 460, in _polar_status_heartbeat self._socket.wait(seconds=1) File "/usr/local/lib/python2.7/dist-packages/socketIO_client/init.py", line 251, in wait self._process_packets() File "/usr/local/lib/python2.7/dist-packages/socketIO_client/init.py", line 276, in _process_packets for engineIO_packet in self._transport.recv_packet(): File "/usr/local/lib/python2.7/dist-packages/socketIO_client/transports.py", line 158, in recv_packet packet_text) File "/usr/local/lib/python2.7/dist-packages/socketIO_client/parsers.py", line 96, in parse_packet_text packet_type = int(get_character(packet_text, 0)) File "/usr/local/lib/python2.7/dist-packages/socketIO_client/symmetries.py", line 33, in get_character return chr(get_byte(x, index)) File "/usr/local/lib/python2.7/dist-packages/socketIO_client/symmetries.py", line 29, in get_byte return indexbytes(x, index) File "/usr/local/lib/python2.7/dist-packages/six.py", line 655, in indexbytes return ord(buf[i]) IndexError: string index out of range 2017-06-28 00:39:43,860 - octoprint.plugins.polarcloud - INFO - Socket disconnected, clear and restart 2017-06-28 00:39:43,871 - octoprint.plugins.polarcloud - WARNING - unable to create socket to Polar Cloud, check again in 2.79280137592 seconds 2017-06-28 00:39:49,987 - octoprint.plugins.polarcloud - ERROR - polar_heartbeat exception Traceback (most recent call last): File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 455, in _polar_status_heartbeat task() File "/home/nyco007/.local/lib/python2.7/site-packages/octoprint_polarcloud/init.py", line 594, in _hello 'signature': base64.b64encode(crypto.sign(self._key, self._challenge, b'sha256')), File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 2092, in sign _lib.EVP_SignUpdate(md_ctx, data, len(data)) TypeError: initializer for ctype 'void *' must be a cdata pointer, not unicode