Open benjamin-salchow opened 4 years ago
There is still a little issue with python3:
Traceback (most recent call last):
File "/home/octopi/OctoPrint/venv/lib/python3.7/site-packages/OctoPrint-1.4.0-py3.7.egg/octoprint/plugin/__init__.py", line 224, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/octopi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_filamentmanager/__init__.py", line 225, in on_event
self.on_printer_state_changed(payload)
File "/home/octopi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_filamentmanager/__init__.py", line 245, in on_printer_state_changed
self.update_filament_usage()
File "/home/octopi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_filamentmanager/__init__.py", line 260, in update_filament_usage
for tool in xrange(0, numTools):
NameError: name 'xrange' is not defined
Last check-in fixes commented error by using range
instead of xrange
.
Hey @benjamin-salchow how do I add your branch onto Octoprint?
@NovaViper Hello, you can use my branch by installing it with the URL:
https://github.com/benjamin-salchow/OctoPrint-FilamentManager/archive/master.zip
This contains all changes in this pull request. Just install it from this zip and later change it to the official if this gets included someday - hopefully ;-)
@benjamin-salchow Hey, thanks for the link! Um, I installed the plugin but it still says it's not Python 3 with the Python 3 Checker plugin
In fact, it still goes and installs the original plugin and not the modified one
Hello @NovaViper - the Python 3 Checker plug-in is useless. This plugin just takes a look in the official registry at Octoprint of the plugin. That's the reason why my fix is not listed, because my plugin is just a fork from this one. If you delete the original one and install the zip from my fork it should work. I did the same on my 3D-Printer and it works fine :-).
I can confirm that changes made by @benjamin-salchow is working for octoprint 1.4.0. Merge!
Hi I'm really confused. Has this been merged into the main branch? If I want to use this branch how do I install it? When I check inside the branch I see the author has linked to the main branch zip file.
How do I install this version?
I upgraded to Python 3.7 and I could not run your plug-in.
I got the following error: "Plugin Filament Manager (0.5.3) is not compatible to Python 3.7.3 (compatibility string: >=2.7,<3)."
So I just added the __plugin_pythoncompat__ information and run this plugin. I just needed to add the UTF-8 encoding within your entity_tag function. Now it works like a charm with Python 3.7.3 and I had no issue with my OctoPrint setup.