OctoPrint-PrintJobHistory icon indicating copy to clipboard operation
OctoPrint-PrintJobHistory copied to clipboard

Prusa Slicer Thumbnail

Open TMTYD opened this issue 1 year ago • 11 comments

The thumbnails are not saved in the Print job History, although I have installed the Prusaslicer Thumbnail plugin and have also specified the values for Thumbnail in PrusaSlicer under Print settings. Why is that?

grafik

Technical Log

TMTYD avatar Aug 12 '23 23:08 TMTYD

i have this in log from octoprint.log

octoprint - ERROR - Exception on /plugin/PrintJobHistory/printJobSnapshot/20230813-013948.jpg [GET]
Traceback (most recent call last):
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/__init__.py", line 1686, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py", line 443, in get_snapshot
    return send_file(absoluteFilename, mimetype='image/jpg', cache_timeout=1)
TypeError: send_file() got an unexpected keyword argument 'cache_timeout'

TMTYD avatar Aug 16 '23 17:08 TMTYD

@TMTYD try the fix I have a PR open for here:

https://github.com/OllisGit/OctoPrint-PrintJobHistory/pull/216/commits/1d86931381f7bb7492a20a8c8f7e73e09cf1bc73

I'm working on trying to get this plugin flagged as abandoned so we can actually get some updates to it

dojohnso avatar Aug 23 '23 16:08 dojohnso

plugin_PrintJobHistory_singlePrintJob.log Hi, I changed that, but unfortunately no improvement. What size must be set in the Prusa slicer for G-code thumbnails? I set 16x16, 200x200 there and png as the format

TMTYD avatar Oct 03 '23 08:10 TMTYD

plugin_PrintJobHistory_singlePrintJob.log Hi, I changed that, but unfortunately no improvement. What size must be set in the Prusa slicer for G-code thumbnails? I set 16x16, 200x200 there and png as the format

that's what mine is set to as well. i've noticed this fix doesn't work for everyone, even on one of my Pi's it's not working but I haven't gotten into why yet. Likely will have to do with versions of board or OS or python, etc.

dojohnso avatar Oct 05 '23 18:10 dojohnso

Hi why does it sometimes work and sometimes not?

grafik

TMTYD avatar Oct 16 '23 16:10 TMTYD

If the file name contains spaces or special characters then the thumbnail is not extracted. The only characters I've found allowed are the minus sign (-) and the underscore character (_)

Titius-Sicanus avatar Oct 16 '23 16:10 Titius-Sicanus

Ok, can you change that somehow?

TMTYD avatar Oct 16 '23 18:10 TMTYD

I'm sorry but I'm also waiting for someone to be able to solve this problem.

Titius-Sicanus avatar Oct 16 '23 21:10 Titius-Sicanus

If octoprint ever acknowledges this plugin is abandoned and someone takes it over (I've been trying for months), best I can do is take a look and maybe submit another PR that people can see and copy the changes locally.

dojohnso avatar Oct 17 '23 01:10 dojohnso

If the file name contains spaces or special characters then the thumbnail is not extracted. The only characters I've found allowed are the minus sign (-) and the underscore character (_)

So that works with the _ substir, then the thumbnail is also saved

TMTYD avatar Oct 19 '23 18:10 TMTYD

@TMTYD @Titius-Sicanus

https://github.com/OllisGit/OctoPrint-PrintJobHistory/pull/226

dojohnso avatar Oct 19 '23 20:10 dojohnso