Upgraded to 1.3.8 stable: Now Octoprint won't boot


#1

Long time Octoprint user, have updated multiple times in the past. But it's been maybe 6 months since I've done a refresh. Logged into my RPi, and did the normal update through that. Note, after it said it was gonig to reboot, the server never came back online, so I had to turn it off \on:

Afterwards, Octorpint isn't booting: Get a '503 Service Unavailable'. However, the webcam is: I can log in and see that stream through my web interface (I realized its separate from Octoprint) . And I can ssh into the pi itself.
If I run the below code I get a Python import error:

pi@octopi2 ~/OctoPrint $ ./run
Traceback (most recent call last):
  File "./run", line 22, in <module>
    octoprint.main()
  File "/home/pi/OctoPrint/src/octoprint/__init__.py", line 564, in main
    from octoprint.cli import octo
  File "/home/pi/OctoPrint/src/octoprint/cli/__init__.py", line 8, in <module>
    import click
ImportError: No module named click

I'm pretty versed in Python programming, but why would this suddenly be failing on a Python import post update?

Since it had been a while, I did the whole apt-get update/upgrade, but after reboot, same issues.

What can I do to get this thing running again?
Thanks


#2

Gina's probably going to want to see:

~/.octoprint/logs/octoprint.txt
ps -ax|grep octoprint


#3

I tried doing a

pi@octopi2 ~ $ pip install click
Downloading/unpacking click
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement click
No distributions at all found for click
Storing complete log in /home/pi/.pip/pip.log

But it's obviously not finding click, despite I can find it here:
https://pypi.org/simple/click/
and here:


So that makes no sense...

Here's that grep:

pi@octopi2 ~ $ ps ax | grep octoprint
 2574 pts/0    S+     0:00 grep --color=auto octoprint

Below is my octoprint.log

2018-05-19 19:38:36,807 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2018-05-19 19:38:36,817 - octoprint.server - INFO - OctoPrint 1.3.5 (master branch)
2018-05-19 19:38:36,829 - octoprint.plugin.core - INFO - 11 plugin(s) registered with the system:
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/announcements
|  Automatic Shutdown (0.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_automaticshutdown
|  Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/corewizard
| !CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/cura
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/discovery
| !Email Notifier (0.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_emailnotifier
|  Plugin Manager (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/pluginmanager
|  RepRapPro (0.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_reprappro
|  Software Update (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/softwareupdate
|  TouchUI (0.3.10) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_touchui
|  Virtual Printer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/virtual_printer
2018-05-19 19:38:36,932 - octoprint.server - INFO - ------------------------------------------------------------------------------
2018-05-19 19:38:36,689 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2018-05-19 19:38:37,412 - py.warnings - WARNING - /home/pi/oprint/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A$ InsecurePlatformWarning
2018-05-19 19:38:37,428 - py.warnings - WARNING - /home/pi/oprint/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A$ InsecurePlatformWarning
2018-05-19 19:38:38,375 - py.warnings - WARNING - /home/pi/oprint/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A$ InsecurePlatformWarning

#4

I should also note this is on a RPi 2B:

Linux octopi2 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux


#5

So, I forcefully installed click via an absolute path to pip, and now, i'm getting more python errors since I've got past that:

pi@octopi2 ~/OctoPrint $ ./run
Traceback (most recent call last):
  File "./run", line 22, in <module>
    octoprint.main()
  File "/home/pi/OctoPrint/src/octoprint/__init__.py", line 564, in main
    from octoprint.cli import octo
  File "/home/pi/OctoPrint/src/octoprint/cli/__init__.py", line 134, in <module>
    from .server import server_commands
ImportError: cannot import name server_commands

Sounds like something is seriously broken here. I've really got nothing to loose on the Pi itself, I may just reinstall Octopi from scratch soon.


#6

Yeah... I think I'd go with a reload on the whole thing. It sounds like something interrupted the last update and you're left in a bad state. It's possible that it's related to the pip version.

You might want to remote into the Raspi and save your /boot/octopi-wpa-supplicant.txt for later ease-of-installation.


#7

Thanks: Already done. New shiny version installed and running. Sometimes it's easier to just start from scratch than try and figure out what went wrong...


#8

What I usually do at a moment like this is to use ApplePi-Baker to clone an image of my microSD.