Giter Club home page Giter Club logo

Comments (10)

cp2004 avatar cp2004 commented on May 27, 2024 1

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.

DrDrache avatar DrDrache commented on May 27, 2024

this bug doesn't affect the installation "for me"

from octoprint-upgrade-to-py3.

StarNamer avatar StarNamer commented on May 27, 2024

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.

cp2004 avatar cp2004 commented on May 27, 2024

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.

StarNamer avatar StarNamer commented on May 27, 2024

Downloaded fresh copy of upgrade.py, rebooted Pi, ran script, same result.

from octoprint-upgrade-to-py3.

StarNamer avatar StarNamer commented on May 27, 2024

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.

StarNamer avatar StarNamer commented on May 27, 2024

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.

StarNamer avatar StarNamer commented on May 27, 2024

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.

cp2004 avatar cp2004 commented on May 27, 2024

@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.

cp2004 avatar cp2004 commented on May 27, 2024

Closing for now, since I have added a note about the error so hopefully it is self explanatory now 🙂

image

from octoprint-upgrade-to-py3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.