Closed rtlprmft closed 3 years ago
Hi @rtlprmft I'm aiming to push a hotfix for this issue by the end of tomorrow. Cheers, Alex
@rtlprmft Installing the plugin manually using this url should fix it: https://github.com/AlexVerrico/octoprint-stats/archive/py2.zip
Update failed! The update did not finish successfully. Please consult octoprint.log and plugin_softwareupdate_console.log for details.
plugin_softwareupdate_console.log tells us (I tried 3 times from the web interface leading to the following 3 entries):
2020-11-08 14:09:32,912 > Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2020-11-08 14:09:32,913 > Collecting https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip 2020-11-08 14:09:32,914 > Downloading https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip 2020-11-08 14:09:33,916 ! ERROR: Package 'OctoPrint-Stats' requires a different Python: 2.7.16 not in '>=3.5,<4' 2020-11-08 14:17:29,704 /home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install
https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip --no-cache-dir 2020-11-08 14:17:31,848 > Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2020-11-08 14:17:31,849 > Collecting https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip 2020-11-08 14:17:31,856 > Downloading https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip 2020-11-08 14:17:32,857 ! ERROR: Package 'OctoPrint-Stats' requires a different Python: 2.7.16 not in '>=3.5,<4' 2020-11-08 14:26:49,914 /home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install
https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip --no-cache-dir 2020-11-08 14:26:52,144 > Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2020-11-08 14:26:52,145 > Collecting https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip 2020-11-08 14:26:52,146 > Downloading https://github.com/AlexVerrico/octoprint-stats/archive/v3.1.1.zip 2020-11-08 14:26:53,148 ! ERROR: Package 'OctoPrint-Stats' requires a different Python: 2.7.16 not in '>=3.5,<4'
While 3.0.0 did install/update without any manual intervertion needed, 3.1.1 seems to be asking for an old Python version again. It seems like Octoprint Stats is still not 100% Python 3+ compatible. It would be so nice to have this fixed and running stable without any manual intervention.
Hi @rtlprmft I'm aiming to push a hotfix for this issue by the end of tomorrow. Cheers, Alex
Thanks for the efforts. Just let me know when the update is available. I will try then.
Also getting an install error, Octoprint Prusa version for the Pi Zero W. I used the gihub version and also the version posted above. Hope this helps finding the error.
The error message:
File "/tmp/easy_install-WhiAhR/numpy-1.19.4/setup.py", line 68f"NumPy {VERSION} may not yet support Python "^SyntaxError: invalid syntax----------------------------------------Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dwfR4Q/pandas/Error!Could not parse output from pip, see plugin_pluginmanager_console.log for generated output
@moong8te You seem to be using Python 2 - but this plugin has been updated to only work on Python 3. The error message says '2.7.16 not in >=3.5,<4', which is the compatibility string. You need a newer version of Python, since Python 2 is EOL
You can update your install to Python 3 using instructions here: https://octoprint.org/blog/2020/09/10/upgrade-to-py3/
@pixelmagic66 It would help if you could post your Python version, since this seems to be related to the issue. Numpy only supports Python 3.6 and newer (which may mean the compatibility string needs adjusting slightly, since currently it allows 3.5)
@pixelmagic66 @rtlprmft The main link for this plugin and any updates are Python 3 only as CP2004 said. I would advise that you update to Python 3. If this is not an option however, you can manually install it from this link: https://github.com/AlexVerrico/octoprint-stats/archive/py2.zip Note that if you install the Python 2 version, you will need to ensure that you do not click update in the future. Cheers, Alex.
@cp2004 I didnt notice that numpy only supports python 3.6 upwards, I'll update the compatibility string now. Cheers, Alex
@cp2004 @AlexVerrico
Thank you very much for your clarification and support. I have to apologize for not testing my situation more thoroughly.
I have two octoprint servers running for different printers. It seems I upgraded the older instance to Python 3+ quite a while ago already.
The new instance is only 1 month old and I must have been assuming the newly downloaded octoprint image at that time came with Python 3 support. Well it does not :-/
Below is my console output: $ python --version Python 2.7.16
Maybe I also got confused by checking the following way which results in: $ ls /usr/bin/python* /usr/bin/python /usr/bin/python2-config /usr/bin/python3m /usr/bin/python2 /usr/bin/python3 /usr/bin/python-config /usr/bin/python2.7 /usr/bin/python3.7 /usr/bin/python2.7-config /usr/bin/python3.7m
Already a lot of Python on my system. The printer is currently in use but I will do further investigation / upgrade right after it is done and post my results here.
Sorry again, my fault.
@moong8te
Remember that on octopi (the raspberry pi image with octoprint pre-installed) the python for octoprint is not the same as the one in /usr/bin. From memory the octoprint one is ~/oprint/bin/python
, but don't quote me on that 😉
so to check the octoprint python version (again I may be wrong) it should be ~/oprint/bin/python --version
so to check the octoprint python version (again I may be wrong) it should be
~/oprint/bin/python --version
$ ~/oprint/bin/python --version Python 2.7.16
You did remember quite well. ;-)
@moong8te in that case, I would recommend that you have a read of this, and then upgrade to Python 3: https://octoprint.org/blog/2020/09/10/upgrade-to-py3/
Today I had time to do the upgrade. As promised please find my journey below. After the Python upgrade following: https://octoprint.org/blog/2020/09/10/upgrade-to-py3/
$ ~/oprint/bin/python --version Python 3.7.3
After that Octoprint-Stats was missing from my main Screen. Plug-In Manager gave me an install button (I made a backup before the Python Update but was hoping to have not lost my stats).
The main install window of the web interface concluded as follows: Successfully uninstalled OctoPrint-Stats-3.1.2 Successfully installed OctoPrint-Stats-3.1.2 Done!
The little status box that also tells you to restart after the install came up like this and I noticed the install Unknown info: Plugin management log Install Unknown: A restart is needed for the changes to take effect.
After the restart I was back to where I started. Stats not showing on my main screen. Plug-in Manager showing it as installable. I tried another time giving me the same result.
Partial Octoprint.log (START)
2020-11-09 23:07:22,367 - octoprint.plugins.pluginmanager - INFO - Installing plugin from https://github.com/AlexVerrico/octoprint-stats/archive/master.zip
2020-11-09 23:07:22,426 - octoprint.plugin.core - INFO - Plugin Anonymous Usage Tracking is disabled.
2020-11-09 23:07:22,737 - octoprint.plugin.core - ERROR - Error loading plugin stats
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 972, in _import_plugin
module = _load_module(module_name, spec)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 71, in _load_module
return imp.load_module(name, f, filename, details)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/vendor/imp.py", line 241, in load_module
return load_package(name, filename)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/vendor/imp.py", line 215, in load_package
return _load(spec)
File "
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.
Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory
2020-11-09 23:07:23,018 - octoprint.plugin.core - ERROR - Error loading plugin bedlevelvisualizer
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/numpy/core/init.py", line 22, in
(END)
I have to correct myself, after the update BedVisualizer is also impacted by what it seems another numpy issue. I heave read the numpy related posts here but it seems that was pre 3.1.2 release.
I have then followed: https://numpy.org/devdocs/user/troubleshooting-importerror.html as stated in the octoprint.log And carried out: sudo apt-get install libatlas-base-dev
After another restart everything was back to normal - BedVisualizer and Stats showing. Checking for stats plug-in in the installed plug-ins it was already on 3.1.2, this time without another install attempt needed.
Thank you for helping me resolve this. Much appreciated!
Installiere Plugin "Printer Statistics" von https://github.com/AlexVerrico/octoprint-stats/archive/master.zip... /home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install file:///tmp/tmpl4woYi/octoprint-stats-master.zip --no-cache-dir Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Processing /tmp/tmpl4woYi/octoprint-stats-master.zip Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-Stats==3.0.0) (1.4.2) Collecting tinydb Downloading https://www.piwheels.org/simple/tinydb/tinydb-3.15.2-py2.py3-none-any.whl Collecting pandas Downloading https://files.pythonhosted.org/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas-0.24.2.tar.gz (11.8MB) ERROR: Command errored out with exit status 1: command: /home/pi/oprint/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-TDCj1e/pandas/setup.py'"'"'; file='"'"'/tmp/pip-install-TDCj1e/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-TDCj1e/pandas/pip-egg-info cwd: /tmp/pip-install-TDCj1e/pandas/ Complete output (52 lines): Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-install-TDCj1e/pandas/setup.py", line 746, in
**setuptools_kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/init.py", line 144, in setup
_install_setup_requires(attrs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/init.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/dist.py", line 720, in fetch_build_eggs
replace_conflicting=True,
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/init.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/init.py", line 1065, in best_match
return self.obtain(req, installer)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/init.py", line 1077, in obtain
return installer(requirement)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/dist.py", line 787, in fetch_build_egg
return cmd.easy_install(req)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 44, in _execfile
code = compile(script, filename, 'exec')
File "/tmp/easy_install-0xYpEv/numpy-1.19.4/setup.py", line 68
f"NumPy {VERSION} may not yet support Python "
^
SyntaxError: invalid syntax
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Fehler! Could not parse output from pip, see plugin_pluginmanager_console.log for generated output