GithubHelp home page GithubHelp logo

ollisgit / octoprint-printjobhistory Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 41.0 9.25 MB

OctoPrint Plugin stores all print-job informations of a print in a database

Python 16.80% CSS 6.33% JavaScript 67.01% HTML 0.58% Less 0.01% Jinja 9.27% Shell 0.01%

octoprint-printjobhistory's Introduction

OctoPrint Repositories


Plugin-Dashboard with some statistics: https://ollisgit.github.io/plugins-dashboard/

Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

A OctoPrint-Plugin that sends the current progress of a print via M117 command to the printer-display and also to the top navigation bar.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

The OctoPrint-Plugin stores all print-job informations of a print in a local database. These informations were collected from OctoPrint itself, but also from other plugins.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

The OctoPrint-Plugin manages all spool informations and stores it in a database.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

This OctoPrint plugin makes it easy to manage your inventory of filament spools. You can add all your spools and assign them to print jobs. The Filament Manager will automatically track the amount of extruded filament so you can always see how much is left on your spools.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

This OctoPrint plugin displays the estimated print cost for the loaded model. The print cost includes the price for the used filament the maintenance and operating cost for the printer as well as the depreciation of the printer.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

Delete or move (since V1.5.0+) automatically the Print-Model:

  • after successful print or if you want, also on canceled and failed prints
  • after predefined days

Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

A Octoprint-Plugin that allows to execute a print without heating your bed or nozzle, turning on any fans, or extruding any filament.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

Plugin starts a print job after the Printer is connected (e.g. after powering up). It selects the newest uploaded file for print.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

Plugin starts a countdown timer after login and if the timer is count to zero, the user is automatically logged out. The timer is restarted each time a user clicks on "something" like a tab-change.


Version Released GitHub Releases (by Release)

GitHub issues open GitHub issues closed GitHub Repo stars

A OctoPrint-Plugin that moves the Temperature-Legend into a specific corner


octoprint-printjobhistory's People

Contributors

blalor avatar hvraven avatar ikopytko avatar manuelmclure avatar ollisgit avatar tduehr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

octoprint-printjobhistory's Issues

Prints Requiring Multiple Rolls of Filament Show Used Filament Incorrectly

When printing large objects that require multiple rolls of filament, The filament sensor on the machine is triggered and sends an M600 command to the printer and Octoprint to change filament, as well as a pause command for Octoprint.

Currently, the amount of filament on for multiple roll prints only counts the amount used until the filament is changed after the filament change the amount is not recorded in the history. The screenshot of Simplify3D's estimate is not as accurate as you would hope but there is a comparison of the projected amount of filament and the amount tracked by PrintJobHistory.

In PrintJobHistorythe amount recorded is from what was left of a partial roll and it did count that roll correctly, But when I swapped out for a new roll, The count did not start again.

Currently, I do not have any GCODE scripts that execute before or after the print is paused because it is all handled by the printer's firmware.

Print Job History Error
Print Job History Error2

Additional Info:
Octoprint Version: 1.3.12
PrintJobHistory Version: RC5
Printer: Modix Big 60 w/MKS Gen 1.4
Firmware: Marlin 1.1.9
Octoprint Server OS; Windows 10

[Enhancement] Option to make the history read only

Hi, I'm running the printer in the small community environment where users have dedicated user login to Octoprint. I would like to use this plugin to measure each user usage of filament, but problem is that any user can delete the job history items to clear their activity. I assume it would be difficult to introduce a permission into the official permission groups to make it read only for only certain group of users. So good enough solution would be to make it possible to disable the job delete button in the settings for everyone, even for admins. If admin would need to remove some job, she/he can be enable temporarily in the settings.

Idea: Also show prints started from the printer.

I sometimes directly print stuff from my printer (um2+ext with thinker firmware).
Octoprint monitors this, and octoslack also is able to report progress on it.. however it is not shown in the history plugin. Probably because the plugin listens to an event that is never fired when manually starting..

Any ideas as to how this could be implemented?

Option to ignore failed prints

It would be really nice to have an option to auto delete failed prints.

I was trying to print a model yesterday and get it dialed in. So I was canceling prints often to make a tweak and start over. When you cancel a print, you want to raise the print head asap so it doesn't start melting the plastic where it froze in place after canceling, or even melt the PEI. It's hard to do that when you get 1) PJH popup that print failed (edit) and 2) Are you Sure? when you try to delete the failed job. Once you get past those 2 prompts, you can raise the print head. It's annoying to have to fight those prompts to begin with in order to be able to gain control of the printer by going to the control tab.

I'd like the opportunity to edit a job when successful, and be prompted for that, but delete it if not and not get these prompts.

Only Failed prints have a picture

Hi,

Thanks for this amazing plugin, it's nice to be able to track all the prints!
It seems currently that only the failed prints have their snapshot saved.
Actually, when the prints finishes, I can see the picture in the popup, then I save the print in the history. After that, while browsing the history, the picture will not be displayed.

Do you need anything to help you debug this?

Small "funny" typo ;-)

Correct List view:
Auswahl_051

And than ... the edit view:
Auswahl_052

Btw. it would be nice to see also the used weight in the list view, because this is IMHO the more common measurement and fits better to the information from the filament manager plugin.
Just my 2¢ ;-)

[Feature Request] Table Selection Checkboxes

Please add selection checkboxes for each item, which could be selected and use to determine a number of jobs to be deleted or exported at one time.

This would be comprised of a manual checkbox next to each job, and a "Select All/Select All This Page/Toggle Selected" Drop-down menu at the top, which would be used by a "Delete Selected/Export Selected to CSV" option.

Feature Request - Picture Delay Timer(s)

Add delay timer option, in seconds, prior to capturing picture of completed print. This would allow for any post print g-code instructions to complete prior to capturing image. In my case, this would allow the x-carriage to be removed from the frame of view prior taking the snapshot.

[Poll] What is the next big thing?

You can influence the future development of this plugin!

Please vote for the feature you would like to see in the next version.
If your feature is not an option in the below poll, please add a comment (one comment for one feature) and then other users could vote via reaction-icon (Thumbs-Up/Down).






[Request] Support for M240 GCode for the final Image

Hey,

is it possible that you react to the M240 gcode in the "on job complete" scripts? This gives us the possibility that we can move the Object to a good position and create the screenshot without our impact.

i hope you understand what i mean.

Plugin manager states update is available but it will not install

Octprint update manager will not update to rc2

2019-11-03 19:33:02,261 - octoprint.plugins.softwareupdate - INFO - Starting update of PrintJobHistory to 1.0.0-rc2... 2019-11-03 19:33:39,160 - octoprint.plugins.softwareupdate - INFO - Update of PrintJobHistory to 1.0.0-rc2 successful! 2019-11-03 19:33:39,345 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk 2019-11-03 19:33:39,348 - octoprint.plugins.softwareupdate - INFO - Restarting... 2019-11-03 19:33:39,538 - octoprint.server - INFO - Shutting down... 2019-11-03 19:33:39,682 - octoprint.events - INFO - Processing shutdown event, this will be our
print_history

changes to settings recorded?

Periodically while printing, i may change the temperature, the speed and the extrusion rate through octoprint. Any chance this plugin will detect those changes? would be nice to get a final output on whatever the last settings were since i may tweak them having moved to a different filament

Update Available for previous version (how to make it go away)

I have updated to 1.0.0rc3 (through the Update Available) but after reloading, I still have an Update Available for v1.0.0-rc2.1.

Please tell me what I have to do to get this plugin in sync with itself. I'm guessing a complete removal of all traces followed by a fresh install of v1.0.0-rc3 but I'm not sure exactly what "complete removal" requires.

Importing CSV file from PrintHistory

Hello, I am having problems importing my old print jobs. I used to use the old PrintHistory plugin https://github.com/imrahil/OctoPrint-PrintHistory/issues and exported my CSV file from that plugin. However, looking at the sample CSV file you provided it seems that the old PrintHistory exports the start time in different formats and has slightly different names for everything resulting in me getting an error when importing saying

Mandatory column is missing!
'DurationFile NamePrint result [success canceled failed]Start Datetime [dd.mm.yyyy hh:mm]'

Nothing to import!

Is there any chance that you maybe could add support for importing old PrintHistory CSV files?

Here is part of my CSV file https://pastebin.com/raw/B9063DPJ

Please clearify plugin dependencies.

A new user is greeted with word "dependencies" which is kind of the opposite of "optional":

To get the real power of the Print Job History - Plugin you need the following plugins installed/enabled:

PreHeat (missing)
FilamentManager (missing)
DisplayLayerProgress (missing)
UltimakerFormatPackage (missing)

Please describe a little about what use they provide... what kind of statistics or what a user will be missing out by not having them. And, can any of those be added, producing extra data, at a later time.

UltimakerFormatPackage is maybe just used for preview if no camera is attached?

FilamentManager page says "This plugin has been abandoned" - and it makes more sense to have filaments in the slicing software, since their properties affect slicing of linear advance setting.

It is hard to imagine what information from DisplayLayerProgress is useful in history.

Preheat: ther is no plugin with that name in the standard repository.

Error installing

This is probably not a problem with your plugin, so feel free to close this issue.
During the install process, octoprint tells me that building the wheel for pillow has failed.

I'm running this on Python version 2.7.16 in a virtual environment only for octoprint.
The complete stacktrace after collecting and downloading all dependencies (I edited those long "copying src/PIL..." lines out) is at the end.

Should I install jpeg as mentioned in the stacktrace in the venv?

`Building wheel for pillow (setup.py): started
ERROR: Command errored out with exit status 1:
command: /home/pi/OctoPrint/venv/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8syIy_/pillow/setup.py'"'"'; file='"'"'/tmp/pip-install-8syIy_/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s_vyhz
cwd: /tmp/pip-install-8syIy_/pillow/
Complete output (141 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/PIL
copying
...
copying src/PIL/FontFile.py -> build/lib.linux-armv7l-2.7/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing top-level names to src/Pillow.egg-info/top_level.txt
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.c'
warning: no files found matching '
.h'
warning: no files found matching '.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'azure-pipelines.yml'
warning: no previously-included files matching '.git
' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
no previously-included directories found matching '.azure-pipelines'
no previously-included directories found matching '.travis'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-8syIy_/pillow/setup.py", line 903, in
raise RequiredDependencyException(msg)
main.RequiredDependencyException:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

ERROR: Failed building wheel for pillow
Building wheel for pillow (setup.py): finished with status 'error'
Running setup.py clean for pillow
Building wheel for peewee (setup.py): started
Building wheel for peewee (setup.py): finished with status 'done'
Created wheel for peewee: filename=peewee-3.13.3-py2-none-any.whl size=127265 sha256=7c74ff9929b31fc6cb7aa9d38bde0763be8429b68eb59de5e956f04f2a4ec55b
Stored in directory: /tmp/pip-ephem-wheel-cache-GLe_kF/wheels/02/12/fa/72f23f801097e35a873dd9e6ba181a62c912f0a75dcc308548
Successfully built Print-Job-History peewee
Failed to build pillow
Installing collected packages: pillow, peewee, Print-Job-History
Running setup.py install for pillow: started
ERROR: Command errored out with exit status 1:
command: /home/pi/OctoPrint/venv/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8syIy_/pillow/setup.py'"'"'; file='"'"'/tmp/pip-install-8syIy_/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-EdIRYu/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/OctoPrint/venv/include/site/python2.7/pillow
cwd: /tmp/pip-install-8syIy_/pillow/
Complete output (141 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
...
copying src/PIL/FontFile.py -> build/lib.linux-armv7l-2.7/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing top-level names to src/Pillow.egg-info/top_level.txt
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.c'
warning: no files found matching '
.h'
warning: no files found matching '.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'azure-pipelines.yml'
warning: no previously-included files matching '.git
' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
no previously-included directories found matching '.azure-pipelines'
no previously-included directories found matching '.travis'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-8syIy_/pillow/setup.py", line 903, in
raise RequiredDependencyException(msg)
main.RequiredDependencyException:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

ERROR: Command errored out with exit status 1: /home/pi/OctoPrint/venv/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8syIy_/pillow/setup.py'"'"'; file='"'"'/tmp/pip-install-8syIy_/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-EdIRYu/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/OctoPrint/venv/include/site/python2.7/pillow Check the logs for full command output.
Running setup.py install for pillow: finished with status 'error'
Error!
Could not parse output from pip, see plugin_pluginmanager_console.log for generated output`

[Behavior Change Requested]

I often have more than one browser windows/tabs open for each instance of OP running... a Dashboard window and the Gcode viewer (as long as the file isn't too big) and/or the Control or Terminal Tab in another window/tab(s). When a print finishes, I get the dialog to save the history info in all open windows for that printer. Can you add a check somehow to only allow that dialog to pop up in one window, or dismiss it or dim the save button in one if the other has already been saved?

I realize that they are both (all) pulling the same browser data from the OP server. Perhaps using a "dirty" flag that is checked every [x] amount of time to see if the info still needs to be saved?

Don't call optional plug-ins "Missing" Plug-ins

I installed and tested PrintJob History. I may, or may not install your other plug-ins in the future. The existing PrintJobHistory works well, but OctoPrint warns me very, very often that I'm missing plug-ins! This is annoying. Don't use this feature as a marketing billboard for your other plug-ins.

Thank you.

Screen Shot 2020-05-13 at 2 20 45 PM

[Enhancement] Ability to reprint directly from the history tab

It would be very convenient to be able to store the actual gcode file so you can quickly re-print a file from history. Especially because, if you send the file directly to Octoprint from your slicer, no real source file is stored on your (slicing) device and requires an extra step to save to a project or something. And for users concerned about SD storage, you could make it configurable, users can decide about using the feature themselves.

A possible solution could be to have a third button in the history list that transfers the selected file to the 'files' section on the main screen.

History quit updating after the OctoPrint 1.4.0 update.

Not sure if the issue is with this plugin or the latest update to OctoPrint. But ever since upgrading to OctoPrint v1.4.0 this plugin no longer records and lists new prints. Any ideas about what may be causing this? (I am using v1.0.0rc5)

Username is incorrect incase of using an api key

If the user is generating an api key the user name in the db is "_api"
This does not help to identify the user if there are multiple ones and all are printing with the api key.

therefore it would be nice to have also something like username and via (web/api/telegram?)

Can No Longer Print Directly from Cura

Good Morning -

Installed RC5 yesterday after you suggested it to me on forum. Once done (and after installing Preheat + Ultamaker dependencies), it works well but I'm having an issue.

Typically, I slice within Cura then choose to print via OctoPrint via it's Cura plug-in. In the past, this loaded the gcode in OctoPrint and started the print immediately - allowing limited monitoring within Cura. After installing your plug-in, choosing to print within Cura switches to the Monitor tab as usual + uploads the gcode, but doesn't load or start the print within OctoPrint.

To note, I'm using the latest OctoPrint as of writing. Happy to test or submit anything needed.

PS: Suggest options within settings to enable/disable features like post print report not only in web interface, but also separately for TouchUI interface. Personally, I like that unexpected feature in web on PC, but rather not have it on touch screen.

Thanks!

Install error in FreeBSD jail

Plugins doesn't install properly in FreeBSD jail. No error messages during install but it just don't get loaded due obvoiously missing sqlite Python module.

octoprint.log:

2020-05-31 12:23:16,968 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading. 2020-05-31 12:23:17,007 - octoprint.plugin.core - ERROR - Error loading plugin PrintJobHistory Traceback (most recent call last): File "/data/OctoPrint/venv/lib/python2.7/site-packages/octoprint/plugin/core.py", line 967, in _import_plugin module = _load_module(module_name, spec) File "/data/OctoPrint/venv/lib/python2.7/site-packages/octoprint/plugin/core.py", line 71, in _load_module return imp.load_module(name, f, filename, details) File "/data/OctoPrint-PrintJobHistory/octoprint_PrintJobHistory/__init__.py", line 26, in <module> from .DatabaseManager import DatabaseManager File "/data/OctoPrint-PrintJobHistory/octoprint_PrintJobHistory/DatabaseManager.py", line 8, in <module> import sqlite3 File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> from dbapi2 import * File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module> from _sqlite3 import * ImportError: No module named _sqlite3

can't install on octoprint with Python3.7

Hi,
I have Octoprint 1.4.0 and moved while ago to python 3, version 3.7.3
Trying to install this plugin but no luck, seems problem around sqlite3 and database creation.
Db indeed is created but 0 bytes in size.

pi@octopi:~/.octoprint/data/PrintJobHistory $ ls -l
-rw-r--r-- 1 pi pi 0 May 19 20:28 printJobHistory.db

Any clues?
marekorok

Here is the log I found:

2020-05-19 19:42:17,732 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python3 -m pip" as command to invoke pip
2020-05-19 19:42:18,242 - octoprint.util.pip - INFO - Version of pip is 20.0.2
2020-05-19 19:42:18,244 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python3.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-05-19 19:42:18,244 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-05-19 19:42:18,327 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2020-05-19 19:42:18,332 - octoprint.plugins.PrintJobHistory - INFO - Start initializing
2020-05-19 19:42:18,332 - octoprint.plugins.PrintJobHistory.DatabaseManager - INFO - Init DatabaseManager
2020-05-19 19:42:18,332 - octoprint.plugins.PrintJobHistory.DatabaseManager - INFO - Creating database in: /home/pi/.octoprint/data/PrintJobHistory/printJobHistory.db
2020-05-19 19:42:18,333 - octoprint.plugins.PrintJobHistory.DatabaseManager - INFO - Check if database-scheme upgrade needed.
2020-05-19 19:42:18,335 - octoprint.plugins.PrintJobHistory.DatabaseManager.SQL - DEBUG - ('SELECT "t1"."databaseId", "t1"."created", "t1"."key", "t1"."value" FROM "pjh_pluginmetadatamodel" AS "t1" WHERE ("t1"."key" = ?) LIMIT ? OFFSET ?', ['databaseSchemeVersion', 1, 0])
2020-05-19 19:42:18,337 - octoprint.plugin.core - ERROR - Exception while initializing plugin PrintJobHistory, disabling it
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/peewee.py", line 3099, in execute_sql
    cursor.execute(sql, params or ())
sqlite3.OperationalError: no such table: pjh_pluginmetadatamodel

Can't export CSV

Me again,

I tried to export my prints as csv, but I just get an error 500 and the following in the octoprint.log:

2020-05-29 11:52:10,756 - tornado.application - ERROR - Uncaught exception GET /plugin/PrintJobHistory/exportPrintJobHistory/CSV (::ffff:192.168.178.23)
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/tornado/web.py", line 1489, in _execute
    result = self.prepare()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/tornado.py", line 257, in prepare
    self._fallback(self.request, b"")
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/tornado.py", line 621, in __call__
    response.extend(app_response)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/werkzeug/wsgi.py", line 506, in __next__
    return self._next()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/werkzeug/wrappers/base_response.py", line 45, in _iter_encoded
    for item in iterable:
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/common/CSVExportImporter.py", line 401, in transform2CSV
    csvColumnValue = '"' + csvColumn.getCSV(job)  + '"'
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/common/CSVExportImporter.py", line 54, in getCSV
    columnValue = str(columnValue)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 11: ordinal not in range(128)
2020-05-29 11:52:10,761 - tornado.access - ERROR - 500 GET /plugin/PrintJobHistory/exportPrintJobHistory/CSV (::ffff:192.168.178.23) 5876.74ms

I activated SQL debugging and there is now a lot more in the log. I attached it here.
sql_debug_export_csv.txt

get_metadata(payload["origin"], payload["file"])

see OllisGit/OctoPrint-DisplayLayerProgress#99

2020-04-18 08:22:09,327 - octoprint.plugin - ERROR - Error while calling plugin PrintJobHistory
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/__init__.py", line 224, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/__init__.py", line 340, in on_event
    self._printJobFinished("canceled", payload)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/__init__.py", line 277, in _printJobFinished
    self._createAndAssignFilamentModel(self._currentPrintJobModel, payload)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/__init__.py", line 155, in _createAndAssignFilamentModel
    fileData = self._file_manager.get_metadata(payload["origin"], payload["file"])
KeyError: 'file'

Single Extruder Print on Dual Extruder System

I am using FilamentManager with my octoprint and I have a dual extruder system. My prints typically only use 1 extruder and my FilamentManager is setup with both extruders. When I print using T1 (extruder 2) it brings in information based on extruder 1. I understand tracking multiple extruders in a print would be an issue, but I would think there should be a way to determine which extruder was used to print and grab that data. Currently this plugin gives me no use because it fills no information in to the usage and puts in the Tool 0 spool info.

Error after import of old print jobs

I just installed the current version and imported some of my old prints from the PrintHistory plugin.

It seemed to work and it shows me that there are now 149 prints (I imported 4 prints). But when I go to the last page, it doesn't reload the list.

In the octoprint.log I get the following error:
2020-05-28 11:34:03,837 - tornado.access - ERROR - 500 GET /plugin/PrintJobHistory/loadPrintJobHistoryByQuery?from=140&to=10&sortColumn=printStartDateTime&sortOrder=desc&filterName=all (192.168.178.23) 194.36ms
This is the csv I imported (had to rename it to txt for github).
import_test3.txt
There are just two prints in there, since tried it with different prints, but the outcome was the same.
I also enabled the SQL debugging, but it seems like there is no output in the octoprint.log

I also downloaded the database file and had a look at it. I exported the 4 prints and attached them here as well.
database-content.txt

Oh, if I import the sample it works like it should.

Any idea why it doesn't want to reload the list?

Enhancement; Import old PrintHistory data

I ran the old Print History plugin for a quite a while so there is a fair bit of historical data. Would it be possible to import that data.

A general import to go with your export in the plugin and an external program to do the conversion of the old data to CSV would be acceptable.

Nozzle Temp isn't showed in history

Hi,

thank you for this awesome plugin.
All is working great - excetp the nozzle temp is shown as 0°C (insted of 195°C).
I'm using latest octoprint with an Longer LK4 and Cura 4.6.1...

Any ideas?

image

install problem

I downloaded the zip file, unzipped it into a folder in the pi home dir, and ran sudo python ~/log/setup.py. I got the error Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?. Help?

WebCam Stream not loading within the Print Job Dialog

Hey there,

I just installed this Plugin and I'm experiencing an issue with the Image Feature.
When opening a logged Print, the capture button is blanked out, but is still klickable.
unnamed_button

Proceeding in wanting to capture an Image I'm greeted with a message that the Stream isn't loaded.
stream_not_loaded

At this point, the following Log appears in the octoprint.log

2020-05-30 17:09:22,492 - octoprint.server.api - ERROR - Error while running a test GET request on None
Traceback (most recent call last):
  File "/opt/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/server/api/__init__.py", line 486, in _test_url
    with requests.request(method=method, url=url, timeout=timeout, verify=valid_ssl, stream=True) as response:
  File "/opt/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/opt/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 516, in request
    prep = self.prepare_request(req)
  File "/opt/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 459, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/opt/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/requests/models.py", line 314, in prepare
    self.prepare_url(url, params)
  File "/opt/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/requests/models.py", line 388, in prepare_url
    raise MissingSchema(error)
MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?

The stream itself is working fine within octoprint but it seems that the Plugin is unable to access it.
webcam_test

Any Idea what might cause this issue?
-Markus

SKR mini E3 1.2 Part Fan wont work?

I've installed my SKR Mini E3 1.2 & 3.5 V3 Touch screen TFT onto my Ender 3 pro
but I cannot get the part fan to come on, it is installed in the Fan 0 position as shown!
Both the hot end fan works & the motherboard fan works!
I have also tried two other fans I have spare but do not work on the Fan 0 socket.
Any help please!

Uploading of image

Hi
Need help.
When I upload a snapshot and see that "Snapshot Uploaded" has been done correctly, why doesn't the uploaded image appear in the box just above?
IS the path where these uploaded images change so I can easily access them myself?
Want to insert a picture I have lying myself!
octoprint plugin - save history

Steen from Denmark

Export csv : Missing accent support

Hi Ollis,
Thanks for your great plug-in! I enjoy discovering it!
Unfortunattely, I found a little issue in the export csv function:
I'm french and I use to write words with accents ;) but it seems your parser does not like it !

My octoprint.log shows:

2019-11-12 14:13:16,601 - octoprint - ERROR - Exception on /plugin/PrintJobHistory/exportPrintJobHistory/CSV [GET]
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py", line 233, in exportPrintJobHistoryData
    csvContent = Transform2CSV.transform2CSV(allJobsDict)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintJobHistory/api/Transform2CSV.py", line 18, in transform2CSV
    writer.writerow(row)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 12: ordinal not in range(128)

I tried suppressing the words with accents in my log and now it's working.
If you're interested in, maybe I could try to give you some help on this kind of small issues.

Regards,
Thomas

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.