Can't start Octoprint


#1

Hi,

What is the problem?
Since this morning I can't start Ocotprint, plugins can't load.

What did you already try to solve it?
I tried to force-reinstall the plugins mentioned in the logs (slugify)

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

octoprint 1.3.9
octoPi version 0.15.1

list python plugins:
argh (0.26.2)
awesome-slugify (1.6.5)
Babel (2.5.3)
backports-abc (0.5)
backports.ssl-match-hostname (3.5.0.1)
blinker (1.4)
certifi (2018.4.16)
chainmap (1.0.2)
chardet (3.0.4)
click (6.2)
emoji (0.4.5)
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)
frozendict (1.2)
future (0.15.2)
futures (3.1.1)
idna (2.6)
itsdangerous (0.24)
Jinja2 (2.8.1)
Markdown (2.6.11)
MarkupSafe (1.0)
monotonic (1.3)
netaddr (0.7.19)
netifaces (0.10.7)
OctoPrint (1.3.9)
OctoPrint-CustomControlPlugin (0.2.1)
OctoPrint-EditorCollection (0.1.2)
OctoPrint-FileManager (0.1.3)
OctoPrint-FirmwareUpdater (1.0.0)
OctoPrint-Fullscreen (0.0.4)
OctoPrint-Gcodebar (0.1.4)
OctoPrint-NavbarTemp (0.11)
OctoPrint-PrintTimeGenius (1.3)
OctoPrint-Stats (1.0.0)
OctoPrint-SystemCommandEditor (0.3.2)
pathtools (0.1.2)
pip (9.0.3)
pkg-resources (0.0.0)
pkginfo (1.4.2)
psutil (5.4.7)
pyasn1 (0.4.2)
pybonjour (1.1.1)
pylru (1.0.9)
pyserial (3.4)
python-dateutil (2.6.1)
python-slugify (1.2.6)
pytz (2018.4)
PyYAML (3.10)
regex (2018.2.21)
requests (2.20.0)
rsa (3.2.3)
sarge (0.1.4)
scandir (1.3)
semantic-version (2.4.2)
setuptools (39.1.0)
singledispatch (3.4.0.3)
six (1.11.0)
sockjs-tornado (1.0.3)
speaklater (1.3)
tornado (4.5.3)
Unidecode (0.4.21)
urllib3 (1.22)
watchdog (0.8.3)
webassets (0.12.1)
websocket-client (0.40.0)
Werkzeug (0.8.3)
wheel (0.31.0)
wrapt (1.10.11)

logs octoprint:
2018-11-09 10:14:32,305 - octoprint.startup - INFO - ******************************************************************************
2018-11-09 10:14:32,307 - octoprint.startup - INFO - Starting OctoPrint 1.3.9
2018-11-09 10:14:32,308 - octoprint.startup - INFO - ******************************************************************************
2018-11-09 10:14:32,383 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2018-11-09 10:14:32,387 - octoprint.startup - INFO - Blacklist processing done
2018-11-09 10:14:32,423 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2018-11-09 10:14:32,989 - octoprint.plugin.core - ERROR - Error loading plugin softwareupdate
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate/init.py", line 26, in
from octoprint.server.util.flask import restricted_access, with_revalidation_checking, check_etag
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:33,016 - octoprint.plugin.core - ERROR - Error loading plugin action_command_prompt
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt/init.py", line 9, in
from octoprint.server import user_permission
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:33,050 - octoprint.plugin.core - ERROR - Error loading plugin logging
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging/init.py", line 10, in
from octoprint.server import NO_CONTENT, admin_permission
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:33,126 - octoprint.plugin.core - ERROR - Error loading plugin pluginmanager
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 14, in
from octoprint.server.util.flask import restricted_access, with_revalidation_checking, check_etag
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:33,302 - octoprint.plugin.core - ERROR - Error loading plugin announcements
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements/init.py", line 23, in
from octoprint.server import admin_permission
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:33,333 - octoprint.plugin.core - INFO - Plugin CuraEngine (<= 15.04) is disabled.
2018-11-09 10:14:33,362 - octoprint.plugin.core - ERROR - Error loading plugin printer_safety_check
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check/init.py", line 10, in
from octoprint.server import user_permission
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:33,976 - octoprint.plugin.core - ERROR - Error loading plugin stats
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_stats/init.py", line 10, in
from octoprint.server import printer
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:34,023 - octoprint.plugin.core - ERROR - Error loading plugin PrintTimeGenius
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintTimeGenius/init.py", line 6, in
import octoprint.filemanager.storage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:34,104 - octoprint.plugin.core - ERROR - Error loading plugin firmwareupdater
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_firmwareupdater/init.py", line 17, in
import octoprint.server.util.flask
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:34,138 - octoprint.plugin.core - ERROR - Error loading plugin filemanager
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 847, in _import_plugin
instance = imp.load_module(key, f, filename, description)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_filemanager/init.py", line 10, in
from octoprint.filemanager.destinations import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
2018-11-09 10:14:34,215 - octoprint.plugin.core - INFO - Found 11 plugin(s) providing 10 mixin implementations, 8 hook handlers
2018-11-09 10:14:34,322 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
File "./octoprint", line 11, in
load_entry_point('OctoPrint==1.3.9', 'console_scripts', 'octoprint')()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/init.py", line 599, in main
octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/cli/server.py", line 188, in serve_command
ignore_blacklist)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/cli/server.py", line 97, in run_server
from octoprint.server import Server
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/init.py", line 65, in
from octoprint.printer.profile import PrinterProfileManager
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/init.py", line 28, in
from octoprint.filemanager import FileDestinations
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 18, in
from .storage import LocalFileStorage
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 27, in
from slugify import Slugify
File "/home/pi/oprint/local/lib/python2.7/site-packages/slugify/init.py", line 2, in
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main

Thanks for your help !


#2

I find the solution:

export PATH=$PATH:/home/pi/oprint/bin #define path for execute pip et octoprint program without ./
cd ~/oprint/local/lib/python2.7/site-packages/ #change directory for analyse the result of commands
pip uninstall awesome_slugify #uninstall slugify
rm -rf slugify #remove the residual file

pip install awesome_slugify==1.6.5 #reinstall slugify
octoprint serve #test the result and quit with ctrl+C

#if octoprint launches properly restart the service
sudo service octoprint restart

I think the problem comes from installing another plugin! but I don't know which one.


#3

@nachidel Can you list the OctoPrint plugins you installed as seen in the Settings -> Plugin Manager?

Or from a remote session to your Raspberry:

cat ~/.octoprint/logs/octoprint.log |grep "|" | grep "= /home/pi/" | sort | uniq | sed 's|\|||g' |grep -v "bundled"


#4

Here is the result of the command:

BLTouch Plugin (0.2.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_BLTouch
Custom Control Editor (0.2.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_customControl
Editor Collection (0.1.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_editorcollection
EEPROM Marlin Editor Plugin (1.2.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_eeprom_marlin
FileManager (0.1.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_filemanager
Firmware Updater (1.0.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_firmwareupdater
Fullscreen Plugin (0.0.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_fullscreen
Gcodebar Plugin (0.1.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_GCodeBar
Navbar Temperature Plugin (0.11) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_navbartemp
Octolapse (0.3.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse
Printer Stats (1.0.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_stats
PrintTimeGenius Plugin (1.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintTimeGenius
System Command Editor (0.3.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_systemcommandeditor


#5

So, it looks like (having read many threads on this) that what likely happened was that your Raspberry Pi was running low on memory at some point of some install and had a problem. It either couldn't install slugify or possible pillow.

Now that you have a list of your plugins, it might be easier to start with a fresh image of OctoPi. But I think that I would make a copy of ~/.octoprint/config.yaml to save a lot of those settings. That's a fairly big list of plugins.

If you're good with remoting into the Raspi and using nano, you might instead make a copy of config.yaml in that same folder. Then edit the existing one to remove the last three plugins which you installed (if you can remember). Then see if rebooting allows OctoPrint to start again. Through a process of elimination, you might be able to get all but one of the plugins running again.

If you did find the one that's causing problems—and assuming that your really needed it—you might then try uninstalling that one from the Settings -> Plugin Manager area and then attempting to reinstall it.