No server connection after upgrade to 1.8.1

What is the problem?

After upgrading to 1.8.1.I restarted octoprint and since then cannot connect to it

What did you already try to solve it?

I tried to restart the service
I tried to stop the service and then start it again
I looked into the log file and these are the lines since the upgrades and see this

2022-05-31 18:56:34,065 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk
2022-05-31 18:57:06,236 - octoprint.plugins.softwareupdate - INFO - Starting update of octoprint to 1.8.1...
2022-05-31 18:57:45,295 - octoprint.plugins.softwareupdate - INFO - Update of octoprint to 1.8.1 successful!
2022-05-31 18:57:45,322 - octoprint.plugins.softwareupdate - INFO - Starting update of pi_support to 2022.3.28...
2022-05-31 18:58:03,176 - octoprint.plugins.softwareupdate - INFO - Update of pi_support to 2022.3.28 successful!
2022-05-31 18:58:03,208 - octoprint.plugins.softwareupdate - INFO - Saved update log to disk
2022-05-31 18:58:03,218 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk
2022-05-31 19:02:16,369 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2022-05-31 19:04:31,745 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from https://plugins.octoprint.org/plugins.json

"sudo service octoprint status" gives this result

octoprint.service - The snappy web interface for your 3D printer
Loaded: loaded (/etc/systemd/system/octoprint.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-05-31 19:41:32 IDT; 8min ago
Process: 3604 ExecStart=/home/pi/OctoPrint/venv/bin/octoprint (code=exited, status=1/FAILURE)
Main PID: 3604 (code=exited, status=1/FAILURE)

May 31 19:41:32 raspberrypi4 octoprint[3604]: working_set = WorkingSet._build_master()
May 31 19:41:32 raspberrypi4 octoprint[3604]: File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 585, in _build_master
May 31 19:41:32 raspberrypi4 octoprint[3604]: return cls._build_from_requirements(requires)
May 31 19:41:32 raspberrypi4 octoprint[3604]: File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 598, in _build_from_requirements
May 31 19:41:32 raspberrypi4 octoprint[3604]: dists = ws.resolve(reqs, Environment())
May 31 19:41:32 raspberrypi4 octoprint[3604]: File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 786, in resolve
May 31 19:41:32 raspberrypi4 octoprint[3604]: raise DistributionNotFound(req, requirers)
May 31 19:41:32 raspberrypi4 octoprint[3604]: pkg_resources.DistributionNotFound: The 'Jinja2>=3.0' distribution was not found and is required by flask
May 31 19:41:32 raspberrypi4 systemd[1]: octoprint.service: Main process exited, code=exited, status=1/FAILURE
May 31 19:41:32 raspberrypi4 systemd[1]: octoprint.service: Failed with result 'exit-code'.

advice will be appreciated

1 Like

that looks like a failed upgrade. Try this. SSH to the pi and run the following the command (replace pi with different username if it was changed from default).

/home/pi/oprint/bin/pip install --force-reinstall --no-cache-dir OctoPrint==1.8.1
sudo service octoprint restart

actually looks like a manual install, so use this path for pip.

/home/pi/OctoPrint/venv/bin/pip install --force-reinstall --no-cache-dir OctoPrint==1.8.1
sudo service octoprint restart

Yes, originally i installed it manually and so far it has worked well with all upgrades.
Will try to re install per our instructions

Thanks
This brought Octoprint back to life, however now there is another problem.
I get a "no serial port found"

Is printer connected and powered on? Typically no serial port means the pi doesn't see your printer.

Same here :sob:

Thanks,
Indeed a cable problem. Did not expect it as I did not touch anything on the printer.

1 Like

It finally worked I just let it continue installing

Hello,
Today I had the same problem after updating from 1.7.3 directly to 1.8.1 (manual installation) via Webinterface

Looks like there is somthing wrong woth the dependencies betwen flask, flask-bable and jinja
The log says:

2022-06-04 14:50:03,524 > Collecting Flask-Babel<3,>=2.0
2022-06-04 14:50:03,524 > Downloading Flask_Babel-2.0.0-py3-none-any.whl (9.3 kB)
2022-06-04 14:50:03,525 > Collecting flask<3,>=2
2022-06-04 14:50:03,525 > Downloading Flask-2.1.2-py3-none-any.whl (95 kB)
...
2022-06-04 14:50:08,780 > Requirement already satisfied: Jinja2>=2.5 in /opt/octoprint/venv/lib/python3.7/site-packages (from Flask-Babel<3,>=2.0->OctoPrint==1.8.1) (2.11.3)
...
2022-06-04 14:50:08,781 > Installing collected packages: zipp, typing-extensions, importlib-metadata, Click, werkzeug, itsdangerous, flask, Flask-Babel, OctoPrint-PiSupport, cachelib, colorlog, frozendict, markdown, sentry-sdk, watchdog, websocket-client, wrapt, zipstream-ng, OctoPrint
...
2022-06-04 14:50:10,253 ! flask 2.1.2 requires Jinja2>=3.0, but you'll have jinja2 2.11.3 which is incompatible.

The solution is to update jinja to >= 3.0
In my case (manual installation to /opt/octoprint/):

# su -
$ systemctl stop octorprint
$ source /opt/octoprint/venv/bin/activate
(venv) $ pip install -U jinja2
(venv) $ deactivate
$ systemctl start octoprint

Back in action and printing

Sorry i have the same problem. How do i do the last bit in this section? is this relating to a serial port error or connection via wifi to your Pi?

The issue here is that OctoPrint is not starting due to some dependencies not being updated properly. Not relating to any serial port errors.

Thanks Charlie for the reply. Im looking for info on serial port error after upgrading to 1.8.1 yesterday. Damn Pi cannot find my printer via Octoprint.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.