Printer Stats plugin 2.0.0

Hello,
Has anyone tried to update the Printer Stats plugin to version 2.0.0?
I tried all the possibilities (from the plugin manager, via the URL and the plugin manager, from an uploaded archive) and always the same problem.
The update fails systematically.
Thanks for your feedback.
Best regards


The problem is the Python version
2019-09-07 12:00:45,680 > RuntimeError: Python version >= 3.5 required.

This seems odd to me. Nowhere in the plugin's setup.py nor init.py seems to demand Python 3. The actual plugin listing page indicates no compatibility concern.

What is your OctoPrint version? (Bottom of the page is where you'd find that.)

Thank you very much for your answer.
My Octoprint version is 1.3.11 (OctoPi 0.16.0)

Here is the listing of what is displayed during the plugin update procedure:

++++++++++++++++++++++++++++++++++++++++++++++++++
Mise à jour de Printer Stats vers la version 2.0.0
++++++++++++++++++++++++++++++++++++++++++++++++++
/home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install https://github.com/amsbr/OctoPrint-Stats/archive/2.0.0.zip --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/amsbr/OctoPrint-Stats/archive/2.0.0.zip
Downloading https://github.com/amsbr/OctoPrint-Stats/archive/2.0.0.zip
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-Stats==2.0.0) (1.3.11)
Collecting tinydb (from OctoPrint-Stats==2.0.0)
Downloading https://files.pythonhosted.org/packages/d7/f9/0e871cbf0da678cf1780609dc6aef26a5ed544c86733fc1ceaf134fce52c/tinydb-3.13.0-py2.py3-none-any.whl
Collecting pandas (from OctoPrint-Stats==2.0.0)
Downloading https://files.pythonhosted.org/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas-0.24.2.tar.gz (11.8MB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-Hl2Bcm/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 724, in fetch_build_eggs
replace_conflicting=True,
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/init.py", line 846, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/init.py", line 1118, in best_match
return self.obtain(req, installer)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/init.py", line 1130, in obtain
return installer(requirement)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/dist.py", line 791, 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 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-iLc5Hl/numpy-1.17.2/setup.py", line 31, in
RuntimeError: Python version >= 3.5 required.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-Hl2Bcm/pandas/
The update did not finish successfully. Please consult octoprint.log and plugin_softwareupdate_console.log for details.

I ran into this same error. It appears that the issue is that the newest version of numpy (1.17.2) requires python 3.5. I was able to get it working by pip installing numpy 1.16.5 (which is 2.7 compatible). That then allowed pandas-0.24.2 to install, which got the add-on to install.

2 Likes

Thank you very much for this information.
I will try this.

All is Ok now but I don’t see my previous stats !!!!

No sure there. I have my previous data. There is a filter drop-down at the top. Maybe that is set too narrowly?

I found my previous statistics.

In the ~/.octoprint/logs folder, I found the octoprint_stats.db.bak file.
After renaming octoprint_stats.db.bak file to octoprint_stats.db and restart octoprint, the octoprint_stats.db was converted to octoprint_stats.json.

My previous statistics are displayed again and now everything is really OK !!!!

1 Like

Hello,
I intalled numpy and pandas:
sudo apt-get update
sudo apt-get install python3-numpy
sudo apt-get install python3-pandas
sudo apt-get install python-numpy
sudo apt-get install python-pandas
After I tried to update Printer Stats 1.0.0 to 2.0.0. again, but I got the same error messages as you wrote.
What can I do wrong?

To install the numpy version that mxm11 recommends I first had to update PIP

/home/pi/oprint/bin/python2 -m pip install --upgrade pip

And then I updated numpy with

/home/pi/oprint/bin/python2 -m pip install numpy==1.16.5

Hope this helps. On my Pi the install took quite a long time, just be patient when it gets to the "Building wheel" stage

...as in "might take 20-30 minutes".

Thank you!
It succeeded.