Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

**Thumbnails broken? READ THIS first** #227

Open
dojohnso opened this issue Oct 19, 2023 · 10 comments
Open

**Thumbnails broken? READ THIS first** #227

dojohnso opened this issue Oct 19, 2023 · 10 comments

Comments

@dojohnso
Copy link

#226 #214

Check out the fixes in the PR(s) (226 includes 214). The author of this repo doesn't seem to pay attention anymore but you can update the files manually per the steps I listed on those.

If they don't solve your issues, feel free to post a comment here and include the Technical Log from the print job history job having issues and I'll do my best to help.

@RalfZi
Copy link

RalfZi commented Nov 1, 2023

No thumbnail by saving the print history but in the log is no error

`2023-11-01 20:24:32,886 - INFO - ----- Start grab Image/thumbnail... -----
2023-11-01 20:24:32,905 - INFO - Try reading Thumbnail
2023-11-01 20:24:32,908 - INFO - Thumbnail is present
2023-11-01 20:24:32,909 - INFO - Thumbnail was captured from metadata
2023-11-01 20:24:32,910 - INFO - Try to take thumbnail, because afterprint/gcode not selected
2023-11-01 20:24:32,912 - INFO - Try reading Thumbnail
2023-11-01 20:24:32,916 - INFO - Try converting thumbnail '/home/pi/.octoprint/data/PrintJobHistory/../prusaslicerthumbnails/RODSLOTH_0.6n_0.2mm_PLA_MK3S_43m.png' to '/home/pi/.octoprint/data/PrintJobHistory/snapshots/20231101-193037.jpg'
2023-11-01 20:24:32,924 - INFO - Converting successfull!
2023-11-01 20:24:32,925 - INFO - Thumbnail was captured from metadata
2023-11-01 20:24:32,927 - INFO - ----- Start reading filament -----
2023-11-01 20:24.

But an error in Octoprint log

2023-11-01 19:36:48,976 - octoprint - ERROR - Exception on /plugin/PrintJobHistory/printJobSnapshot/20231101-162600.jpg [GET]
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/init.py", line 1686, in wrapper
return f(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/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'
2023-11-01 19:36:49,053 - octoprint - ERROR - Exception on /plugin/PrintJobHistory/printJobSnapshot/20231101-054800.jpg [GET]
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/oprint/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/init.py", line 1686, in wrapper
return f(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/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'
2023-11-01 19:36:49,101 - octoprint - ERROR - Exception on /plugin/PrintJobHistory/printJobSnapshot/20231026-092900.jpg [GET]
Traceback (most recent call last):

@RalfZi
Copy link

RalfZi commented Nov 2, 2023

I fix the error in correct line 443 in PrintJobHistoryAPI.py to
return send_file(absoluteFilename, mimetype='image/jpg' )
greetings

@ezi00
Copy link

ezi00 commented Nov 4, 2023

I fix the error in correct line 443 in PrintJobHistoryAPI.py to return send_file(absoluteFilename, mimetype='image/jpg' ) greetings

thanks worked for me as well..

@Filmman586
Copy link

Will an update be coming anytime soon?

@dojohnso
Copy link
Author

anyone who sees this and the PRs mentioned above haven't been merged yet, please head over to this issue and comment on it to try and convince OctoPrint that this plugin has been abandoned. Cheers!

OctoPrint/plugins.octoprint.org#1222

/cc @Filmman586

@dojohnso
Copy link
Author

I fix the error in correct line 443 in PrintJobHistoryAPI.py to return send_file(absoluteFilename, mimetype='image/jpg' ) greetings

I'm glad it worked for you! Did you happen to see the change in this PR that changes the cache_timeout parameter to max_age? Just curious if that would've worked as well. Sounds like the change you made is an alternate approach to the same bug.

@Filmman586
Copy link

I have no way of editing the file, can I get the file already fixed?

@Hottabych-
Copy link

I have no way of editing the file, can I get the file already fixed?
Don't understand, because if you can exchange the file then you can edit your local file too e.g. with nano oder vi. As you can read in several sources it is a very simple fix. Look at #218 (comment) alternativ #226

@Filmman586
Copy link

Filmman586 commented Nov 26, 2023 via email

@dojohnso
Copy link
Author

WE DID IT - i now control this plugin and have pushed the update. thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants