-
Notifications
You must be signed in to change notification settings - Fork 33
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
PTG completely breaks uploads in OctoPrint 1.11.0rc1 #322
Comments
I've provided a fixing PR: #323 |
Thank you! |
Can you tell me in which version this will be fixed? I can then modify the blacklist to allow loading of PTG again from that version onwards. |
I'll just do it right now! Version 2.3.4 has your fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before reporting, check if your problem is here:
https://github.com/eyal0/OctoPrint-PrintTimeGenius/wiki/Common-problems
Describe the bug
PTG monkey patches FileManager's
add_file
method. With 1.11.0rc1 this method has received a new keyword parameteruser
to track user uploads. The patched replacement method doesn't support this parameter and makes all uploads fail:Monkey patching is something I don't consider that big of a problem, I do it myself when I don't have another choice, but you have to be very careful when you do it with internals - especially undocumented ones - and ideally work heavily with
*args, **kwargs
in your overwritten method signatures, to protect against issues like this one by always staying compatible to added parameters.I fear I will have to blacklist PTG for OctoPrint 1.11.x until this is fixed as it is effectively rendering OctoPrint unusable for its purpose 😕
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'd expect uploads to work when PTG is installed.
OctoPrint Version: 1.11.0rc1
PrintTimeGenius Version (if you know): 2.3.3
If relevant, upload the PrintTimeGenius log and any problematic gcode files (you might need to rename the files). This is really important. I probably can't help you without this.
I don't think the log will be of any help here as the error happens within OctoPrint, but here you go:
plugin_PrintTimeGenius_engine.log
Also here's a very basic file with which to reproduce after renaming back to
.gcode
(any gcode works though):upload.gcode.txt
The text was updated successfully, but these errors were encountered: