SyntaxError when trying to update from 1.8.7 to 1.9.1

What is the problem?

When attempting to upgrade OctoPrint from 1.8.7 to 1.9.1, I am getting the following errors:

Updating, please wait.
+++++++++++++++++++++++++++++++
Now updating OctoPrint to 1.9.1
+++++++++++++++++++++++++++++++
/home/pi/oprint/bin/python -m pip --disable-pip-version-check install https://github.com/OctoPrint/OctoPrint/archive/1.9.1.zip --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/OctoPrint/OctoPrint/archive/1.9.1.zip
Downloading https://github.com/OctoPrint/OctoPrint/archive/1.9.1.zip (6.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 1.5 MB/s eta 0:00:00
Installing build dependencies: started
error: subprocess-exited-with-error
Γ— pip subprocess to install build dependencies did not run successfully.
β”‚ exit code: 1
╰─> [48 lines of output]
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/__main__.py", line 29, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/_internal/cli/main.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/_internal/cli/autocompletion.py", line 12, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/_internal/metadata/__init__.py", line 3, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/_internal/metadata/base.py", line 21, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/_vendor/packaging/requirements.py", line 10, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/_vendor/pyparsing/__init__.py", line 141, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 963, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 906, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1280, in find_spec
File "<frozen importlib._bootstrap_external>", line 1254, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1235, in _legacy_get_spec
File "<frozen importlib._bootstrap>", line 441, in spec_from_loader
File "<frozen importlib._bootstrap_external>", line 594, in spec_from_file_location
File "/tmp/pip-standalone-pip-k4izgb72/__env_pip__.zip/pip/_vendor/pyparsing/helpers.py", line 862
) + Group(lastExpr + opExpr1 + thisExpr + opExpr2!+ |hisExpr)
^
SyntaxError: invalid syntax
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Γ— pip subprocess to install build dependencies did not run successfully.
β”‚ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Installing build dependencies: finished with status 'error'
The update did not finish successfully. Please consult <code>octoprint.log</code> and <code>plugin_softwareupdate_console.log</code> for details.

What did you already try to solve it?

I've validated that I am running python3. I have removed python2 and and ran a reinstall on python3 via apt. I've also run the python-to-python3 apt, and I have upgraded pip via python, and put pip in the PATH.

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No, same results

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

octoprint-systeminfo-20230706085817.zip (39.2 KB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

I am using an Ender 3D V2. I have successfully used OctoPrint for a long time, and I am able to print without issues on 1.8.7. My version of OctoPrint runs on a Raspberry Pi 3B+ with Raspbian GNU/Lunix 10 (buster)

Hi :slight_smile:

To be honest I have no idea what caused this error - but if I were you I would try to reinstall OctoPrint and hope that fixes the issue.

You can of course also wait a bit longer. Maybe someone else got an idea.

just replace the paths with the ones of your setup.

Thanks. Looks like a simple reinstall worked. I'll chalk it up to :person_shrugging:

2 Likes

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