alexverrico / octoprint-stats Goto Github PK
View Code? Open in Web Editor NEWStats for your octoprint instance. Mirrored from https://github.com/amsbr/OctoPrint-Stats originally
Stats for your octoprint instance. Mirrored from https://github.com/amsbr/OctoPrint-Stats originally
Describe the bug
Plug-in installation process hangs.
After typing: pip install "https://github.com/AlexVerrico/octoprint-stats/archive/master.zip"
the installation process hangs, see enclosed screenshot.
Did install: apt install libatlas-base-dev as advised in documentation.
To Reproduce
pip install "https://github.com/AlexVerrico/octoprint-stats/archive/master.zip"
Expected behavior
Successful installation
Environment information:
Version 1.6.1 of OctoPrint in a Docker container on a Raspberrypi3 A+.
Additional context
https://community.octoprint.org/t/printer-statistics-plugin-fails-to-install/35231
Hi,
thanks for the plugin.
As the power consumption monitoring is not very accurate when estimating it like this, I would suggest adding the possibility to input data from an external power consumption monitoring device.
E.g. a WiFi plug flashed with Tasmota firmware.
Data could be provided via a REST API directly (JSON) or a bash command like it is done in the PSU-Control plugin.
when i try to install it it takes a few minutes and then commes this
Fehler!
Could not install plugin, unknown error, please consult octoprint.log for details
how do i upload the log
Describe the bug
Inside octoprint.log the following error si shown:
TypeError: argument of type 'NoneType' is not iterable
To Reproduce
Just lock into octoprint.log after plugin was installed (and activated)
Expected behavior
No error
Screenshots
n/a
Environment information:
Additional context
snipped from octoprint.log:
2022-10-04 20:42:44,704 - octoprint.plugins.stats - INFO - Printer Stats - on_event
2022-10-04 20:42:44,704 - octoprint.plugin - ERROR - Error while calling plugin stats
Traceback (most recent call last):
File "/home/pi/OctoPrint/lib/python3.9/site-packages/octoprint/plugin/init.py", line 273, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/OctoPrint/lib/python3.9/site-packages/octoprint/util/init.py", line 1688, in wrapper
return f(*args, **kwargs)
File "/home/pi/OctoPrint/lib/python3.9/site-packages/octoprint_stats/init.py", line 801, in on_event
if "owner" not in payload:
TypeError: argument of type 'NoneType' is not iterable
Describe the bug
I have octoprint setup on a raspberry pi and I have tried a few times to install the printer statistics plugin through the plugin manager and when octoprint restarts nothing appears
Environment information:
Describe the bug
I wanted to install your plugin, so I upgraded my install to python 3.
Then I installed your plugin dependencies and then the plugin.
After reboot, no stats tab is present and I don't find the plugin in the plugin list
To Reproduce
Steps to reproduce the behavior:
sudo apt install libatlas-base-dev
I also tried to install the plugin from the link, no luck either
Expected behavior
Plugin is installed, tab is present and unable to reinstall
Screenshots
If applicable, add screenshots to help explain your problem.
Once installed, the reboot message is weird:
Environment information:
Additional context
The install log:
Installing plugin "Printer Statistics" from https://github.com/AlexVerrico/octoprint-stats/archive/master.zip...
/home/pi/oprint/bin/python -m pip --disable-pip-version-check install file:///tmp/tmp7up_9gs9/octoprint-stats-master.zip --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /tmp/tmp7up_9gs9/octoprint-stats-master.zip
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint-Stats==3.1.2) (1.5.3)
Requirement already satisfied: tinydb in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint-Stats==3.1.2) (4.4.0)
Requirement already satisfied: pandas in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint-Stats==3.1.2) (1.2.3)
Requirement already satisfied: numpy in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint-Stats==3.1.2) (1.19.2)
Requirement already satisfied: netifaces<1,>=0.10.9 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.10.9)
Requirement already satisfied: watchdog==0.10.4 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.10.4)
Requirement already satisfied: unidecode<0.05,>=0.04.14 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.4.21)
Requirement already satisfied: semantic-version<3,>=2.8.5 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (2.8.5)
Requirement already satisfied: psutil<6,>=5.7 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (5.8.0)
Requirement already satisfied: rsa==4.0 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (4.0)
Requirement already satisfied: Click<8,>=7.1.2 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (7.1.2)
Requirement already satisfied: Flask-Login<0.6,>=0.5 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.5.0)
Requirement already satisfied: OctoPrint-FileCheck>=2020.08.07 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (2021.2.23)
Requirement already satisfied: sarge==0.1.5post0 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.1.5.post0)
Requirement already satisfied: netaddr<1,>=0.7.19 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.8.0)
Requirement already satisfied: OctoPrint-FirmwareCheck>=2020.09.23 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (2021.2.4)
Requirement already satisfied: markdown<3.2,>=3.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (3.1.1)
Requirement already satisfied: frozendict<2,>=1.2 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.2)
Requirement already satisfied: zeroconf<0.25,>=0.24 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.24.5)
Requirement already satisfied: sentry-sdk<1,>=0.15.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.20.3)
Requirement already satisfied: wrapt<2,>=1.12.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.12.1)
Requirement already satisfied: Flask-Assets<3,>=2.0 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (2.0)
Requirement already satisfied: pkginfo<2,>=1.5.0.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.7.0)
Requirement already satisfied: emoji<1,>=0.5.4 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.6.0)
Requirement already satisfied: itsdangerous<2,>=1.1.0 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.1.0)
Requirement already satisfied: requests<3,>=2.23.0 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (2.25.1)
Requirement already satisfied: markupsafe<2.0,>=1.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.1.1)
Requirement already satisfied: filetype<2,>=1.0.7 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.0.7)
Requirement already satisfied: tornado==5.1.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (5.1.1)
Requirement already satisfied: PyYAML<6,>=5.3.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (5.4.1)
Requirement already satisfied: websocket-client<1,>=0.57 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.58.0)
Requirement already satisfied: werkzeug<2,>=1.0.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.0.1)
Requirement already satisfied: Flask-Babel<2,>=1.0 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.0.0)
Requirement already satisfied: blinker<2,>=1.4 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.4)
Requirement already satisfied: flask<2,>=1.1.2 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.1.2)
Requirement already satisfied: future<1,>=0.18.2 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.18.2)
Requirement already satisfied: regex!=2018.11.6 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (2020.11.13)
Requirement already satisfied: pylru<2,>=1.2 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (1.2.0)
Requirement already satisfied: pyserial<4,>=3.4 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (3.5)
Requirement already satisfied: feedparser<7,>=6.0.2 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (6.0.2)
Requirement already satisfied: cachelib<1,>=0.1 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (0.1.1)
Requirement already satisfied: Jinja2<3,>=2.11.2 in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint->OctoPrint-Stats==3.1.2) (2.11.3)
Requirement already satisfied: pyasn1>=0.1.3 in /home/pi/oprint/lib/python3.7/site-packages (from rsa==4.0->OctoPrint->OctoPrint-Stats==3.1.2) (0.4.8)
Requirement already satisfied: pathtools>=0.1.1 in /home/pi/oprint/lib/python3.7/site-packages (from watchdog==0.10.4->OctoPrint->OctoPrint-Stats==3.1.2) (0.1.2)
Requirement already satisfied: sgmllib3k in /home/pi/oprint/lib/python3.7/site-packages (from feedparser<7,>=6.0.2->OctoPrint->OctoPrint-Stats==3.1.2) (1.0.0)
Requirement already satisfied: webassets>=2.0 in /home/pi/oprint/lib/python3.7/site-packages (from Flask-Assets<3,>=2.0->OctoPrint->OctoPrint-Stats==3.1.2) (2.0)
Requirement already satisfied: Babel>=2.3 in /home/pi/oprint/lib/python3.7/site-packages (from Flask-Babel<2,>=1.0->OctoPrint->OctoPrint-Stats==3.1.2) (2.9.0)
Requirement already satisfied: pytz in /home/pi/oprint/lib/python3.7/site-packages (from Flask-Babel<2,>=1.0->OctoPrint->OctoPrint-Stats==3.1.2) (2021.1)
Requirement already satisfied: setuptools>=36 in /home/pi/oprint/lib/python3.7/site-packages (from markdown<3.2,>=3.1->OctoPrint->OctoPrint-Stats==3.1.2) (54.0.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/pi/oprint/lib/python3.7/site-packages (from requests<3,>=2.23.0->OctoPrint->OctoPrint-Stats==3.1.2) (1.26.3)
Requirement already satisfied: chardet<5,>=3.0.2 in /home/pi/oprint/lib/python3.7/site-packages (from requests<3,>=2.23.0->OctoPrint->OctoPrint-Stats==3.1.2) (4.0.0)
Requirement already satisfied: certifi>=2017.4.17 in /home/pi/oprint/lib/python3.7/site-packages (from requests<3,>=2.23.0->OctoPrint->OctoPrint-Stats==3.1.2) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in /home/pi/oprint/lib/python3.7/site-packages (from requests<3,>=2.23.0->OctoPrint->OctoPrint-Stats==3.1.2) (2.10)
Requirement already satisfied: six in /home/pi/oprint/lib/python3.7/site-packages (from websocket-client<1,>=0.57->OctoPrint->OctoPrint-Stats==3.1.2) (1.15.0)
Requirement already satisfied: ifaddr in /home/pi/oprint/lib/python3.7/site-packages (from zeroconf<0.25,>=0.24->OctoPrint->OctoPrint-Stats==3.1.2) (0.1.7)
Requirement already satisfied: python-dateutil>=2.7.3 in /home/pi/oprint/lib/python3.7/site-packages (from pandas->OctoPrint-Stats==3.1.2) (2.8.1)
Building wheels for collected packages: OctoPrint-Stats
Building wheel for OctoPrint-Stats (setup.py): started
Building wheel for OctoPrint-Stats (setup.py): finished with status 'done'
Created wheel for OctoPrint-Stats: filename=OctoPrint_Stats-3.1.2-py3-none-any.whl size=870587 sha256=22992d232dd9fdde85a59b7e0edd1c51907aefb450c98f5127957ed8acd2995a
Stored in directory: /tmp/pip-ephem-wheel-cache-tku0m9db/wheels/ce/b5/b4/3bda1881fb70bf7dc96625d08e38eeba638538229e20e8d7fa
Successfully built OctoPrint-Stats
Installing collected packages: OctoPrint-Stats
Attempting uninstall: OctoPrint-Stats
Found existing installation: OctoPrint-Stats 3.1.2
Uninstalling OctoPrint-Stats-3.1.2:
Successfully uninstalled OctoPrint-Stats-3.1.2
Successfully installed OctoPrint-Stats-3.1.2
Done!
Hello,
ERROR: Failed building wheel for pandas
ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly
Error!
Could not parse output from pip, see plugin_pluginmanager_console.log for generated output
2021-02-03 01:15:38,881 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-02-03 01:18:29,613 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2021-02-03 01:18:57,341 - octoprint.server - INFO - OctoPrint 1.5.3
2021-02-03 01:23:10,576 - octoprint.plugin.core - INFO - 27 plugin(s) registered with the system:
| Action Command Notification Support (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/action_command_notification
| Action Command Prompt Support (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/action_command_prompt
| Announcement Plugin (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/announcements
| Anonymous Usage Tracking (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/tracking
| Application Keys Plugin (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/appkeys
| Backup & Restore (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/backup
| Bed Visualizer (1.0.0) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_bedlevelvisualizer
| BetterHeaterTimeout (1.3.0) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_BetterHeaterTimeout
| Change Filament Plugin (0.3.2) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_Change_Filament
| Core Wizard (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/corewizard
| Dashboard (1.17.0) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_dashboard
| Discovery (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/discovery
| DisplayLayerProgress Plugin (1.25.3) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_DisplayLayerProgress
| Error Tracking (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/errortracking
| File Check (2020.8.7) (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_file_check
| Firmware Check (2020.9.23) (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_firmware_check
| Firmware Updater (1.7.7) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_firmwareupdater
| GCode Viewer (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/gcodeviewer
| Logging (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/logging
| Navbar Temperature Plugin (0.14) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_navbartemp
| OctoPrint Anywhere (1.1.1) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_anywhere
| Plugin Manager (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/pluginmanager
| PrintTimeGenius Plugin (2.2.7) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_PrintTimeGenius
| Prusa Leveling Guide (1.0.12) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_PrusaLevelingGuide
| PrusaSlicer Thumbnails (0.1.4) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint_prusaslicerthumbnails
| Software Update (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/softwareupdate
| Virtual Printer (bundled) = /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins/virtual_printer
Prefix legend: ! = disabled, # = blacklisted, * = incompatible
2021-02-03 01:23:10,612 - octoprint.server.util.sockjs - INFO - Client connection closed: 192.168.101.10
2021-02-03 01:23:15,771 - octoprint.environment - INFO - Detected environment is Python 3.8.5 under Linux (linux). Details:
| hardware:
| cores: 4
| freq: 1008.0
| ram: 515592192
| os:
| bits: 32
| id: linux
| platform: linux
| python:
| pip: 20.3.3
| version: 3.8.5
| virtualenv: /home/pi/OctoPrint/venv
2021-02-03 18:51:48,654 - octoprint.plugins.pluginmanager - INFO - Installing plugin from https://github.com/AlexVerrico/octoprint-stats/archive/master.zip
2021-02-03 18:51:49,219 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading.
2021-02-03 19:01:34,459 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-02-03 19:16:34,463 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-02-03 19:31:34,465 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-02-03 19:46:36,570 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-02-03 19:49:29,386 - octoprint.plugins.pluginmanager - ERROR - Installing the plugin from https://github.com/AlexVerrico/octoprint-stats/archive/master.zip failed, could not parse output from pip. See plugin_pluginmanager_console.log for generated output
2021-02-03 19:49:30,044 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from https://plugins.octoprint.org/plugins.json
What is wrong and why i cant instal this plugin? :(
My Reddit post regarding "kWH" and the bottom axis. There is no context of what the lower labels correlate to.
https://www.reddit.com/r/octoprint/comments/zphcsn/how_do_i_read_the_power_usage_stat_in_the_printer/
Label the axis clearly.
hi!
the update fails and the following error is logged in plugin_softwareupdate_console.log
2020-11-11 17: 46: 35,112! ERROR: Package 'OctoPrint-Stats' requires a different Python: 2.7.16 not in '> = 3.6, <4'
browser.user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
connectivity.connection_check: 9.9.9.9:53
connectivity.connection_ok: true
connectivity.enabled: true
connectivity.online: true
connectivity.resolution_check: octoprint.org
connectivity.resolution_ok: true
env.hardware.cores: 4
env.hardware.freq: 1200
env.hardware.ram: 917016576
env.os.bits: 32
env.os.id: linux
env.os.platform: linux2
env.plugins.pi_support.model: Raspberry Pi 3 Model B Rev 1.2
env.plugins.pi_support.octopi_version: 0.17.0
env.plugins.pi_support.throttle_state: 0x0
env.python.pip: 19.3.1
env.python.version: 2.7.16
env.python.virtualenv: true
octoprint.safe_mode: false
octoprint.version: 1.5.0rc1
printer.firmware: Marlin 2.0.7.2 (Oct 17 2020
Hello,
In order to have statistics on all the printing history of the life of the printer, we use another PrintJobHistory plug-in which builds an SQLITE database on all printing components.
https://plugins.octoprint.org/plugins/PrintJobHistory/
is it possible to use this database to feed your plug-in which is really very well done.
I contacted the creator of PrintJobHistory so that he could add stats like yours to his plug-in but here is his response:
_""Hi @beunoutch,
statistics/reports is an endless topic. Each user wants different data in a different format.
That's the reason why I decided to just make a simple stats-popup instead of a full blown stats-plugin, like https://plugins.octoprint.org/plugins/stats/
But my goal is to "open" all the PrintJob-Data to other plugins, via WebService, WebSocket or Plugin-APIs.
And I also want to store the data into a "real" database. So, that the user can connect to the database and generate it's own report.
Maybe you can ask in the the stats-plugin author about an integration or ask in the OP-Forum (https://community.octoprint.org/) about developing such plugin.""_
I think that linking your 2 databases would be really great.
could you adapt your plugin to analyze in addition to your database, the printJobHistory database
I chose printJobHistory because there is filament management, the name of the parts with comments, photos ....
so in addition to all your statistics it would be very interesting for example to have.
-statistics by combining your 2 SQLITE databases.
Describe the bug
A clear and concise description of what the bug is.
Octoprint-stats used to work. I am not sure when it disappeared, unfortunately. I upgraded to the latest Octoprint by creating a backup thereafter creating a new Octoprint instance and restoring the backup.
And then later noticed the Stats are not there any more.
I tried uninstalling and reinstalling the plugin
pip Can see the plugin but it is not even listed in the plugin manger in Octoprint
I am not sure if it can be reproduced on other systems.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment information:
Additional context
Add any other context about the problem here.
2023-11-14 07:31:46,793 - octoprint.plugin.core - ERROR - Error loading plugin stats
Traceback (most recent call last):
File "/home/johan/oprint/lib/python3.9/site-packages/octoprint/plugin/core.py", line 1294, in _import_plugin
module = _load_module(module_name, spec)
File "/home/johan/oprint/lib/python3.9/site-packages/octoprint/plugin/core.py", line 52, in _load_module
return imp.load_module(name, f, filename, details)
File "/home/johan/oprint/lib/python3.9/site-packages/octoprint/vendor/imp.py", line 238, in load_module
return load_package(name, filename)
File "/home/johan/oprint/lib/python3.9/site-packages/octoprint/vendor/imp.py", line 212, in load_package
return _load(spec)
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/johan/oprint/lib/python3.9/site-packages/octoprint_stats/__init__.py", line 18, in <module>
import pandas as pd
File "/home/johan/oprint/lib/python3.9/site-packages/pandas/__init__.py", line 16, in <module>
raise ImportError(
ImportError: Unable to import required dependencies:
numpy: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
The install log
`~/oprint/bin/pip install https://github.com/AlexVerrico/octoprint-stats/archive/master.zip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/AlexVerrico/octoprint-stats/archive/master.zip
Using cached https://github.com/AlexVerrico/octoprint-stats/archive/master.zip
Preparing metadata (setup.py) ... done
Requirement already satisfied: OctoPrint in ./oprint/lib/python3.9/site-packages (from OctoPrint-Stats==3.1.4) (1.9.3)
Requirement already satisfied: tinydb in ./oprint/lib/python3.9/site-packages (from OctoPrint-Stats==3.1.4) (4.8.0)
Requirement already satisfied: pandas in ./oprint/lib/python3.9/site-packages (from OctoPrint-Stats==3.1.4) (2.1.1)
Requirement already satisfied: numpy in ./oprint/lib/python3.9/site-packages (from OctoPrint-Stats==3.1.4) (1.26.0)
Requirement already satisfied: OctoPrint-FileCheck>=2021.2.23 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2021.2.23)
Requirement already satisfied: OctoPrint-FirmwareCheck>=2021.10.11 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2021.10.11)
Requirement already satisfied: OctoPrint-PiSupport>=2023.5.24 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2023.10.10)
Requirement already satisfied: argon2-cffi<22,>=21.3.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (21.3.0)
Requirement already satisfied: Babel<2.13,>=2.12.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.12.1)
Requirement already satisfied: cachelib<0.11,>=0.10.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.10.2)
Requirement already satisfied: Click<9,>=8.1.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (8.1.3)
Requirement already satisfied: colorlog<7,>=6.7.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (6.7.0)
Requirement already satisfied: emoji<3,>=2.2.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.8.0)
Requirement already satisfied: feedparser<7,>=6.0.10 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (6.0.10)
Requirement already satisfied: filetype<2,>=1.2.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.2.0)
Requirement already satisfied: Flask-Assets<3,>=2.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.0)
Requirement already satisfied: Flask-Babel<4,>=3.1.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (3.1.0)
Requirement already satisfied: Flask-Login<0.7,>=0.6.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.6.2)
Requirement already satisfied: Flask-Limiter<4,>=3.3.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (3.5.0)
Requirement already satisfied: flask<2.3,>=2.2.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.2.5)
Requirement already satisfied: frozendict<3,>=2.3.7 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.3.8)
Requirement already satisfied: future<1,>=0.18.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.18.3)
Requirement already satisfied: markdown<4,>=3.4.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (3.5)
Requirement already satisfied: netaddr<0.9,>=0.8 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.8.0)
Requirement already satisfied: netifaces<1,>=0.11 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.11.0)
Requirement already satisfied: passlib<2,>=1.7.4 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.7.4)
Requirement already satisfied: pathvalidate<3,>=2.5.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.5.2)
Requirement already satisfied: pkginfo<2,>=1.9.6 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.9.6)
Requirement already satisfied: psutil<6,>=5.9.4 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (5.9.5)
Requirement already satisfied: pydantic==1.10.12 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.10.12)
Requirement already satisfied: pylru<2,>=1.2.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.2.1)
Requirement already satisfied: pyserial<4,>=3.5 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (3.5)
Requirement already satisfied: PyYAML<7,>=6.0.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (6.0.1)
Requirement already satisfied: requests<3,>=2.28.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.31.0)
Requirement already satisfied: sarge==0.1.7.post1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.1.7.post1)
Requirement already satisfied: semantic-version<3,>=2.10.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.10.0)
Requirement already satisfied: sentry-sdk<2,>=1.19.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.31.0)
Requirement already satisfied: tornado<7,>=6.2 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (6.2)
Requirement already satisfied: watchdog<3,>=2.3.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.3.1)
Requirement already satisfied: websocket-client<2,>=1.5.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.6.4)
Requirement already satisfied: werkzeug<2.3,>=2.2.3 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2.2.3)
Requirement already satisfied: wrapt<1.16,>=1.15 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.15.0)
Requirement already satisfied: zeroconf==0.39.4 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.39.4)
Requirement already satisfied: zipstream-ng<2.0.0,>=1.5.0 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.7.1)
Requirement already satisfied: blinker<2,>=1.6.1 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (1.6.3)
Requirement already satisfied: class-doc<0.3,>=0.2.6 in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.2.6)
Requirement already satisfied: regex in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (2022.9.13)
Requirement already satisfied: unidecode in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.4.21)
Requirement already satisfied: wheel in ./oprint/lib/python3.9/site-packages (from OctoPrint->OctoPrint-Stats==3.1.4) (0.41.3)
Requirement already satisfied: typing-extensions>=4.2.0 in ./oprint/lib/python3.9/site-packages (from pydantic==1.10.12->OctoPrint->OctoPrint-Stats==3.1.4) (4.4.0)
Requirement already satisfied: async-timeout>=4.0.1 in ./oprint/lib/python3.9/site-packages (from zeroconf==0.39.4->OctoPrint->OctoPrint-Stats==3.1.4) (4.0.3)
Requirement already satisfied: ifaddr>=0.1.7 in ./oprint/lib/python3.9/site-packages (from zeroconf==0.39.4->OctoPrint->OctoPrint-Stats==3.1.4) (0.2.0)
Requirement already satisfied: python-dateutil>=2.8.2 in ./oprint/lib/python3.9/site-packages (from pandas->OctoPrint-Stats==3.1.4) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in ./oprint/lib/python3.9/site-packages (from pandas->OctoPrint-Stats==3.1.4) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in ./oprint/lib/python3.9/site-packages (from pandas->OctoPrint-Stats==3.1.4) (2023.3)
Requirement already satisfied: argon2-cffi-bindings in ./oprint/lib/python3.9/site-packages (from argon2-cffi<22,>=21.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (21.2.0)
Requirement already satisfied: more-itertools>=5.0.0 in ./oprint/lib/python3.9/site-packages (from class-doc<0.3,>=0.2.6->OctoPrint->OctoPrint-Stats==3.1.4) (10.1.0)
Requirement already satisfied: sgmllib3k in ./oprint/lib/python3.9/site-packages (from feedparser<7,>=6.0.10->OctoPrint->OctoPrint-Stats==3.1.4) (1.0.0)
Requirement already satisfied: Jinja2>=3.0 in ./oprint/lib/python3.9/site-packages (from flask<2.3,>=2.2.3->OctoPrint->OctoPrint-Stats==3.1.4) (3.1.2)
Requirement already satisfied: itsdangerous>=2.0 in ./oprint/lib/python3.9/site-packages (from flask<2.3,>=2.2.3->OctoPrint->OctoPrint-Stats==3.1.4) (2.1.2)
Requirement already satisfied: importlib-metadata>=3.6.0 in ./oprint/lib/python3.9/site-packages (from flask<2.3,>=2.2.3->OctoPrint->OctoPrint-Stats==3.1.4) (5.0.0)
Requirement already satisfied: webassets>=2.0 in ./oprint/lib/python3.9/site-packages (from Flask-Assets<3,>=2.0->OctoPrint->OctoPrint-Stats==3.1.4) (2.0)
Requirement already satisfied: limits>=2.8 in ./oprint/lib/python3.9/site-packages (from Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (3.6.0)
Requirement already satisfied: ordered-set<5,>4 in ./oprint/lib/python3.9/site-packages (from Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (4.1.0)
Requirement already satisfied: rich<14,>=12 in ./oprint/lib/python3.9/site-packages (from Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (12.6.0)
Requirement already satisfied: six>=1.5 in ./oprint/lib/python3.9/site-packages (from python-dateutil>=2.8.2->pandas->OctoPrint-Stats==3.1.4) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoPrint-Stats==3.1.4) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoPrint-Stats==3.1.4) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoPrint-Stats==3.1.4) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in ./oprint/lib/python3.9/site-packages (from requests<3,>=2.28.2->OctoPrint->OctoPrint-Stats==3.1.4) (2022.9.24)
Requirement already satisfied: MarkupSafe>=2.1.1 in ./oprint/lib/python3.9/site-packages (from werkzeug<2.3,>=2.2.3->OctoPrint->OctoPrint-Stats==3.1.4) (2.1.1)
Requirement already satisfied: zipp>=0.5 in ./oprint/lib/python3.9/site-packages (from importlib-metadata>=3.6.0->flask<2.3,>=2.2.3->OctoPrint->OctoPrint-Stats==3.1.4) (3.10.0)
Requirement already satisfied: deprecated>=1.2 in ./oprint/lib/python3.9/site-packages (from limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (1.2.13)
Requirement already satisfied: importlib-resources>=1.3 in ./oprint/lib/python3.9/site-packages (from limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (6.1.0)
Requirement already satisfied: packaging<24,>=21 in ./oprint/lib/python3.9/site-packages (from limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (21.3)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in ./oprint/lib/python3.9/site-packages (from rich<14,>=12->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (0.9.1)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in ./oprint/lib/python3.9/site-packages (from rich<14,>=12->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (2.13.0)
Requirement already satisfied: cffi>=1.0.1 in ./oprint/lib/python3.9/site-packages (from argon2-cffi-bindings->argon2-cffi<22,>=21.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (1.15.1)
Requirement already satisfied: pycparser in ./oprint/lib/python3.9/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi<22,>=21.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (2.21)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in ./oprint/lib/python3.9/site-packages (from packaging<24,>=21->limits>=2.8->Flask-Limiter<4,>=3.3.0->OctoPrint->OctoPrint-Stats==3.1.4) (3.0.9)
Building wheels for collected packages: OctoPrint-Stats
Building wheel for OctoPrint-Stats (setup.py) ... done
Created wheel for OctoPrint-Stats: filename=OctoPrint_Stats-3.1.4-py3-none-any.whl size=870606 sha256=6346ac443b86d52e58888ab40d70eb0e9db5369b8cf6bb119c1e2ada160337ca
Stored in directory: /tmp/pip-ephem-wheel-cache-fwtyhkdx/wheels/38/26/d4/7d6f53061105f3e009e62004f9900468d7e01c3af70eb65965
Successfully built OctoPrint-Stats
Installing collected packages: OctoPrint-Stats
Successfully installed OctoPrint-Stats-3.1.4`
HI,
would it be possible to see the
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
Can you please help me
I can’t get it to install
By URL
Describe the bug
Checking the logs, I found the following output:
2022-05-30 13:58:21,867 - octoprint.plugins.detailedprogress - INFO - Printing stopped. Detailed progress stopped.
2022-05-30 13:58:21,895 - octoprint.plugins.stats - INFO - Printer Stats - on_event
2022-05-30 13:58:21,895 - octoprint.plugin - ERROR - Error while calling plugin stats
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/__init__.py", line 273, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1688, in wrapper
return f(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_stats/__init__.py", line 939, in on_event
user = payload["user"]
KeyError: 'user'
Environment information:
Updating, please wait.
++++++++++++++++++++++++++++++++++++
Now updating Printer Stats to v3.1.2
++++++++++++++++++++++++++++++++++++
/home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install https://github.com/amsbr/OctoPrint-Stats/archive/v3.1.2.zip --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/amsbr/OctoPrint-Stats/archive/v3.1.2.zip
ERROR: HTTP error 404 while getting https://github.com/amsbr/OctoPrint-Stats/archive/v3.1.2.zip
ERROR: Could not install requirement https://github.com/amsbr/OctoPrint-Stats/archive/v3.1.2.zip because of error 404 Client Error: Not Found for url: https://codeload.github.com/amsbr/OctoPrint-Stats/zip/v3.1.2
ERROR: Could not install requirement https://github.com/amsbr/OctoPrint-Stats/archive/v3.1.2.zip because of HTTP error 404 Client Error: Not Found for url: https://codeload.github.com/amsbr/OctoPrint-Stats/zip/v3.1.2 for URL https://github.com/amsbr/OctoPrint-Stats/archive/v3.1.2.zip
The update did not finish successfully. Please consult octoprint.log
and plugin_softwareupdate_console.log
for details.
I have a problem with the automated installer in octoprint. The plugin is installed und uninstalled in one step:
Here is the log:
...
Successfully built OctoPrint-Stats
Installing collected packages: OctoPrint-Stats
Attempting uninstall: OctoPrint-Stats
Found existing installation: OctoPrint-Stats 3.1.2
Uninstalling OctoPrint-Stats-3.1.2:
Successfully uninstalled OctoPrint-Stats-3.1.2
Successfully installed OctoPrint-Stats-3.1.2
Fertig!
What do I do wrong?
I have tried to install the plugin on my system using the plugin manager. It starts everything normally up to the following lines:
09:57:07,251 > Created wheel for OctoPrint-Stats: filename=OctoPrint_Stats-3.0.0-cp27-none-any.whl size=870602 sha256=2425fa48454ccc8040e48b122aa4bbc57c214fb37206320866a3c60a0c8465f9
09:57:07,251 > Stored in directory: /tmp/pip-ephem-wheel-cache-5g5B3A/wheels/9b/93/b7/53ddec31768b672a3665bf261b8a0c5ec18da892572fe8a53d
09:57:07,252 > Building wheel for pandas (setup.py): started
09:58:40,339 > Building wheel for pandas (setup.py): still running...
10:05:28,657 > Building wheel for pandas (setup.py): still running...
10:17:14,334 > Building wheel for pandas (setup.py): still running...
10:18:28,686 > Building wheel for pandas (setup.py): still running...
After that, I get the message that the installation failed. The whole system is then unusable and must be restarted via the terminal. I have already updated and upgraded the RaspberryPi via the terminal. Also the third attempt to install the plugin was not successful. To find the problems I have added the log's
I hope you can solve the problem
The database is stored in logs rather than in data meaning that the .json isn't backed up through the OctoPrint backup plugin.
Is your feature request related to a problem? Please describe.
There is currently no easy way to export data for further processing/analysis.
Describe the solution you'd like
A way to export the data to a format which can be easily processed further.
Describe alternatives you've considered
Downloading the plugin database: this is not a good solution as it isn't a format which can be imported into many programs.
Additional context
note this feature request is not coming from me, it is a summary of many requests that i have received. I am putting it here so that it will be included in the next release, and so anyone who wants to add anything to the feature description can.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.