Comments (10)
As far as I understand it, this is an OctoLapse error, as I see it when running a backup (as the script does to read the plugin list) with that installed. Seems that it doesn't play nice when you only half-initialise the plugin subsystem to read it.
Doesn't affect installation since it is in the backup process, and the backup completes successfully.
@FormerLurker - is this something that you would need to address? You can reproduce by running octoprint plugins backup:backup --exclude timelapses --exclude --uploads
from octoprint-upgrade-to-py3.
this bug doesn't affect the installation "for me"
from octoprint-upgrade-to-py3.
I tried this and upgrade.py stopped outputting after the line referencing octoprint. I left it for 20 minutes, during which time atop showed python3 was using 100% cpu, so I interupted it with ctrl-c. If I left it for longer, would it eventually complete or would it be better to uninstall octolapse, upgrade and reinstall it?
pi@octopi:~ $ python3 upgrade.py
OctoPrint Upgrade to Py 3 (v2.0.4)
Hello!
This script will move your existing OctoPrint configuration from Python 2 to Python 3
This script requires an internet connection and it will disrupt any ongoing print jobs.
It will install the latest version of OctoPrint (1.4.2) and all plugins.
No configuration or other files will be overwritten
Press [enter] to continue or ctrl-c to quit
Detecting system info...
OctoPi version: 0.17.0
Getting OctoPrint version...
OctoPrint version: 1.4.2
Reading installed plugins...
No handlers could be found for logger "octoprint.plugin.core"
2020-09-11 22:22:45,232 - octolapse.__init__ - INFO - Release mode detected.
^CTraceback (most recent call last):
File "upgrade.py", line 555, in <module>
backup_location = create_backup(path_to_venv, config_dir)
File "upgrade.py", line 341, in create_backup
Aborted!
output, poll = run_sys_command(command)
File "upgrade.py", line 95, in run_sys_command
output_line = process.stdout.readline().decode('utf-8')
KeyboardInterrupt
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/logging/__init__.py", line 1676, in shutdown
h.close()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/logging/handlers.py", line 32, in close
self._executor.shutdown(wait=True)
AttributeError: 'OctolapseConsoleHandler' object has no attribute '_executor'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/logging/__init__.py", line 1676, in shutdown
h.close()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/logging/handlers.py", line 32, in close
self._executor.shutdown(wait=True)
AttributeError: 'OctolapseConsoleHandler' object has no attribute '_executor'
pi@octopi:~ $ ^C
from octoprint-upgrade-to-py3.
Reading the plugin list is quite quick (<5secs) for me on a Pi4B.
Looks like something has gone wrong inside the script there, the only 'loop' it would get into is reading the plugins, or the backup command is constantly outputting something that locks up the script.
Try it again, see if it was a one-off, if not then we will investigate further tomorrow.
from octoprint-upgrade-to-py3.
Downloaded fresh copy of upgrade.py, rebooted Pi, ran script, same result.
from octoprint-upgrade-to-py3.
It appears to be the execution (run_sys_command) of the command "/home/pi/oprint/bin/python -m octoprint plugins backup:backup --exclude timelapse --exclude uploads". I've tried running this manually and, after the "Creating backup at..." line, nothing else happens. I'll leave it running overnight and see if it completes.
from octoprint-upgrade-to-py3.
A few seconds after I posted the last message, it failed. The key message is:
OSError: [Errno 40] Too many levels of symbolic links: u'/home/pi/.octoprint/scripts/gcode/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/snippets/sn/sn/snippets/snippets/snippets/snippets/snippets/sn/snippets/sn/snippets/snippets/sn/snippets/snippets/snippets/snippets/snippets/retractAndRaise'
Some time ago, I found that OctoPrint's script handler, it seems, doesn't allow a snippet to be called from another snippet. The workaround to get this to work, was to create a symbolic link 'snippets' in the 'scripts/gcode/snippets' folder which points to itself. Obviously, backup is trying to follow this!
I've restarted the upgrade. Backup still reports an error, but the list of plugins seems complete. However, several plugins report errors: OctoSlack, OctoLapse and at least one other.
from octoprint-upgrade-to-py3.
It seems DetailedPProgress has a syntax error under Python3 (incompatible use of tabs and spaces in indentation); I didn't notice that this actually lists as "Python >=2.7, <3".
OctoLapse uses a non-latin1 character ( UnicodeEncodeError: 'latin-1' codec can't encode character '\u2018' in position 55: ordinal not in range(256)),
OctoSlack requires Pillow, which can't find some headers or library files, specifically 'jpeg'. The documentation for Pillow says it needs external libraries Zlib and libjpeg, but doesn't explain how to install them.
from octoprint-upgrade-to-py3.
@StarNamer this is not the place to report issues with running plugins - report them to the plugin author. It's not my responsibility to make sure every plugin works, just that the script does.
from octoprint-upgrade-to-py3.
Closing for now, since I have added a note about the error so hopefully it is self explanatory now 🙂
from octoprint-upgrade-to-py3.
Related Issues (20)
- Use Python 3 venv, install `python3-venv` first HOT 1
- [Bug] Pip errors as wheel is not working properly *sometimes*. HOT 4
- upgrade requires python 3.6? HOT 2
- [Bug] ibpython3.7-dev_3.7.3-2+deb10u2_armhf not found HOT 5
- X server needed to run that script ? HOT 2
- [Bug] UnicodeDecodeError running `sudo apt-get update` HOT 2
- [Bug] Can't set locale & Broken pipe error HOT 2
- Need to update pip as well or OctoPrint complains HOT 1
- Suppress pip's `Cache entry deserialization failed` messages HOT 2
- [Bug] After seemingly successful update to python 3, "Software Update" is disabled HOT 4
- [Bug] Updating to Python3 failed with SpaghettiDetective, no connection available anymore HOT 4
- [Bug] HOT 2
- Command line option --allow-releaseinfo-change is not understood in combination with the other options HOT 3
- Unsigned Repository stops script[Bug] HOT 18
- Installing octoprint fails due to "ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>." HOT 5
- ERROR: failed to update package list HOT 4
- [Bug] HOT 2
- Python --version shows 2.7.16 on fresh image? HOT 3
- [Bug] HOT 2
- [Bug] SSL certificate problem: certificate has expired HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octoprint-upgrade-to-py3.