OctoPrint-Slack
OctoPrint-Slack copied to clipboard
Support Octoprint 1.4.0
Since 1.4.0 has been released the plugin does not work anymore.
The reason for this:
Deprecated since version 1.3.0: file: the file’s full path on disk (local) or within its storage (sdcard). To be removed in 1.4.0.
filename: the file’s name. To be removed in 1.4.0.
https://docs.octoprint.org/en/master/events/#printing
2020-04-30 12:33:57,932 - octoprint.plugin - ERROR - Error while calling plugin slack 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_slack/__init__.py", line 98, in on_event filename = os.path.basename(payload["file"]) KeyError: 'file'
Change https://github.com/richjoyce/OctoPrint-Slack/blob/4aafb81c405d02321221031fcd44d7565686becd/octoprint_slack/init.py#L98
To: filename = payload["name"]
Thanks a lot @weactivist
Thanks for opening this issue @weactivist, I just could not figure out why I could not get it right! Hopefully it gets fixed real soon.