taxilian / OctoPrint-Twilio

Octoprint plugin for print completion notifications using Twilio (for free w/ trial account)
GNU Affero General Public License v3.0
5 stars 9 forks source link

Plugin crashes when attempting to send SMS with image #13

Closed MisterGlass closed 3 years ago

MisterGlass commented 5 years ago

Looking through my logs, I found the following error:

2019-06-07 06:26:09,643 - octoprint.plugins.smsnotifier - INFO - Taking Snapshot.... Say Cheese!
2019-06-07 06:26:09,673 - octoprint.plugins.smsnotifier - INFO - Processing /tmp/tmpSVevtM.jpg before uploading.
2019-06-07 06:26:09,675 - octoprint.plugin - ERROR - Error while calling plugin smsnotifier
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/__init__.py", line 219, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_smsnotifier/__init__.py", line 67, in on_event
    self._process_snapshot(snapshot_path)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_smsnotifier/__init__.py", line 155, in _process_snapshot
    ffmpeg_command += ["-vf", sarge.shell_quote(",".join(rotate_params)), snapshot_path]
NameError: global name 'sarge' is not defined

This may be related to #10, but I installed via octoprint this week so the fix reported there should be in place.

jonathancarroll commented 5 years ago

I am also seeing the issue on a clean install from today using the octoprint plugin manager. Turning off images fixed the problem.

MisterGlass commented 5 years ago

I actually have a fix for this I've been running since June, I must have forgotten to PR. Creating one now.

shadycuz commented 3 years ago

Released https://pypi.org/project/OctoPrint-Twilio/