Reboot and death

I had to reboot the Raspberry and the OctoPrint is dead.
I upgraded the system, upgraded PIP, upgraded OctoPrint and still the same.
service octoprint restart - does nothing
manually starts octoprint gives:

Starting the server via "octoprint" is deprecated, please use "octoprint serve" from now on.
2019-08-25 19:36:33,933 - octoprint.startup - INFO - ******************************************************************************
2019-08-25 19:36:33,935 - octoprint.startup - INFO - Starting OctoPrint 1.3.11
2019-08-25 19:36:33,937 - octoprint.startup - INFO - ******************************************************************************
2019-08-25 19:36:34,020 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2019-08-25 19:36:34,022 - 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...
2019-08-25 19:36:34,196 - 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 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate/__init__.py", line 12, in <module>
    import flask
EOFError: EOF read where object expected
2019-08-25 19:36:34,210 - octoprint.plugin.core - ERROR - Error loading plugin errortracking
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/errortracking/__init__.py", line 12, in <module>
    from flask import jsonify
ImportError: cannot import name jsonify
2019-08-25 19:36:34,355 - 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 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt/__init__.py", line 9, in <module>
    from octoprint.server import user_permission
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/__init__.py", line 10, in <module>
    from flask import Flask, g, request, session, Blueprint, Request, Response, current_app
ImportError: cannot import name Flask
2019-08-25 19:36:34,373 - 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 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging/__init__.py", line 10, in <module>
    from octoprint.server import NO_CONTENT, admin_permission
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/__init__.py", line 10, in <module>
    from flask import Flask, g, request, session, Blueprint, Request, Response, current_app
ImportError: cannot import name Flask
2019-08-25 19:36:34,404 - octoprint.plugin.core - ERROR - Error loading plugin tracking
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 9, in <module>
    from flask_babel import gettext
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_babel/__init__.py", line 16, in <module>
    from flask import current_app, request
ImportError: cannot import name current_app
2019-08-25 19:36:34,474 - 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 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 14, in <module>
    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 10, in <module>
    from flask import Flask, g, request, session, Blueprint, Request, Response, current_app
ImportError: cannot import name Flask
2019-08-25 19:36:34,665 - 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 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements/__init__.py", line 23, in <module>
    from octoprint.server import admin_permission
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/__init__.py", line 10, in <module>
    from flask import Flask, g, request, session, Blueprint, Request, Response, current_app
ImportError: cannot import name Flask
2019-08-25 19:36:34,686 - octoprint.plugin.core - ERROR - Error loading plugin forcelogin
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/forcelogin/__init__.py", line 10, in <module>
    import flask_login
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_login.py", line 20, in <module>
    from flask import (_request_ctx_stack, abort, current_app, flash, redirect,
ImportError: cannot import name _request_ctx_stack
2019-08-25 19:36:34,750 - octoprint.plugin.core - ERROR - Error loading plugin backup
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup/__init__.py", line 11, in <module>
    from octoprint.server import admin_permission, NO_CONTENT
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/__init__.py", line 10, in <module>
    from flask import Flask, g, request, session, Blueprint, Request, Response, current_app
ImportError: cannot import name Flask
2019-08-25 19:36:34,776 - octoprint.plugin.core - ERROR - Error loading plugin appkeys
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys/__init__.py", line 12, in <module>
    from flask_babel import gettext
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_babel/__init__.py", line 16, in <module>
    from flask import current_app, request
ImportError: cannot import name current_app
2019-08-25 19:36:34,786 - octoprint.plugin.core - ERROR - Error loading plugin corewizard
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard/__init__.py", line 9, in <module>
    from flask_babel import gettext
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_babel/__init__.py", line 16, in <module>
    from flask import current_app, request
ImportError: cannot import name current_app
2019-08-25 19:36:34,805 - octoprint.plugin.core - ERROR - Error loading plugin pi_support
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pi_support/__init__.py", line 11, in <module>
    from flask_babel import gettext
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_babel/__init__.py", line 16, in <module>
    from flask import current_app, request
ImportError: cannot import name current_app
2019-08-25 19:36:34,820 - 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 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check/__init__.py", line 10, in <module>
    from octoprint.server import user_permission
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/__init__.py", line 10, in <module>
    from flask import Flask, g, request, session, Blueprint, Request, Response, current_app
ImportError: cannot import name Flask
2019-08-25 19:36:34,849 - octoprint.plugin.core - INFO - Plugin Discovery is disabled.
2019-08-25 19:36:36,173 - octoprint.plugin.core - INFO - Plugin ProgressBasedOntime Plugin (0.1.2) is disabled.
2019-08-25 19:36:36,501 - 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 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintTimeGenius/__init__.py", line 10, in <module>
    from flask_babel import gettext
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_babel/__init__.py", line 16, in <module>
    from flask import current_app, request
ImportError: cannot import name current_app
2019-08-25 19:36:36,561 - octoprint.plugin.core - ERROR - Error loading plugin filamentmanager
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 863, in _import_plugin
    instance = imp.load_module(module_name, f, filename, description)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_filamentmanager/__init__.py", line 16, in <module>
    from .api import FilamentManagerApi
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_filamentmanager/api/__init__.py", line 13, in <module>
    from flask import jsonify, request, make_response, Response
ImportError: cannot import name jsonify
2019-08-25 19:36:36,749 - octoprint.plugin.core - INFO - Plugin Octolapse (0.3.4) is disabled.
2019-08-25 19:36:37,027 - octoprint.plugin.core - INFO - Found 6 plugin(s) providing 3 mixin implementations, 3 hook handlers
2019-08-25 19:36:37,249 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
  File "./octoprint", line 11, in <module>
    load_entry_point('OctoPrint==1.3.11', 'console_scripts', 'octoprint')()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/__init__.py", line 609, 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 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 1114, in invoke
    return Command.invoke(self, ctx)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 555, 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/__init__.py", line 175, in octo
    ctx.invoke(serve_command, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/click/core.py", line 555, 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 206, in serve_command
    ignore_blacklist)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/cli/server.py", line 105, in run_server
    from octoprint.server import Server
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/__init__.py", line 10, in <module>
    from flask import Flask, g, request, session, Blueprint, Request, Response, current_app
ImportError: cannot import name Flask

any help?

When you "manually started OctoPrint"... did you first activate the virtual environment?

source ~/oprint/bin/activate
octoprint serve

No, but it gives the same

Maybe easier - how can I install it again without write the whole sd card again? And how can I restore settings/plugins (filament length and so on)?
pip install --upgrade https://get.octoprint.org/latest
gives no help

When you say "had to reboot the Raspberry" do you mean that you pulled the power without doing a sudo poweroff or similar? If so, it's likely that the microSD second partition is corrupt so a start-over may be in order.

Using the Settings -> Backup feature would have allowed you possibly to restore after the re-do.

If you're handy, though, you might use this to help backup some of the files.

1 Like

Guilty - I lost WiFi connection, connected monitor and keyboard but the screen was black - no more things to do than pull the plug. I know it's dangerous.
Anyway - I run fsck and corrected the errors then I run
pip install --upgrade --force-reinstall https://get.octoprint.org/latest
and it seems to be working, anyway I can see the main screen by http. I have my plugins, my last prints I hope It would work. Thank you for your help.

.........

So far it's working

1 Like