Closed shadycuz closed 6 years ago
Problem is here
Either we are not getting a 2XX back from the upload or something changed upstream in the requests library. I will look into it.
I'm seeing it too.
2018-01-26 16:17:30,415 - octoprint.plugins.smsnotifier - INFO - Taking Snapshot.... Say Cheese!
2018-01-26 16:17:31,475 - octoprint.plugins.smsnotifier - INFO - Processing /tmp/tmpuGB_G7.jpg before uploading.
2018-01-26 16:17:40,905 - octoprint.plugins.smsnotifier - WARNING - Could not send a webcam image, sending only text notification.
2018-01-26 16:17:42,007 - octoprint.plugins.smsnotifier - INFO - Print notification sent to 7604833337
2018-01-26 16:17:42,008 - octoprint.plugins.smsnotifier - WARNING - Could not get a image from the webcam. Is it enabled?
2018-01-26 16:17:42,024 - octoprint.timelapse - WARNING - Cannot capture image, image number is unset```
I feel like they changed the API. I'll have time to investigate tomorrow.
On Jan 26, 2018 11:19 AM, "Ted Timmons" notifications@github.com wrote:
I'm seeing it too.
2018-01-26 16:17:30,415 - octoprint.plugins.smsnotifier - INFO - Taking Snapshot.... Say Cheese! 2018-01-26 16:17:31,475 - octoprint.plugins.smsnotifier - INFO - Processing /tmp/tmpuGB_G7.jpg before uploading. 2018-01-26 16:17:40,905 - octoprint.plugins.smsnotifier - WARNING - Could not send a webcam image, sending only text notification. 2018-01-26 16:17:42,007 - octoprint.plugins.smsnotifier - INFO - Print notification sent to 7604833337 2018-01-26 16:17:42,008 - octoprint.plugins.smsnotifier - WARNING - Could not get a image from the webcam. Is it enabled? 2018-01-26 16:17:42,024 - octoprint.timelapse - WARNING - Cannot capture image, image number is unset```
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/taxilian/OctoPrint-Twilio/issues/6#issuecomment-360830563, or mute the thread https://github.com/notifications/unsubscribe-auth/AQTJtytpeyMZnlbCFkA1TLyCpkM9x2lEks5tOfsngaJpZM4RruEV .
Confirmed it is getting a 500 back:
2018-01-26 20:05:38,037 - octoprint.plugins.smsnotifier - INFO - status code: 500
@tedder Cool, Im going to the store, and when I come back I'm going to work on a fix. Upload.im includes a reason in status_txt so if you print(response.status_txt)
or print the entire response we should see what went wrong.
@tedder Fixed, you can wait on the update or grab it from https://github.com/shadycuz/OctoPrint-Twilio/tree/bugfix/500_from_api
Thanks. How do you set up a plugin so you can develop it in octoprint? I tried cloning the folder to oprint/plugins, tried to oprint/local/lib/python2.7/site-packages/, it barfs because it isn't an egg, so it's missing a PKG-INFO file.
2018-01-27 04:51:36,415 - py.warnings - WARNING - /home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.6-py2.7.egg/octoprint/plugin/core.py:1538: UserWarning: No PKG-INFO found for package: octoprint_smsnotifier
warnings.warn('No PKG-INFO found for package: %s' % self.package_name)
2018-01-27 04:51:36,425 - octoprint.plugin.core - WARNING - Could not locate plugin smsnotifier
@tedder Are you trying to develop on a pi? Or on your desktop? I do both. The instructions can be found here http://docs.octoprint.org/en/master/plugins/gettingstarted.html .
If you are just trying to use my branch to get the fix you can. Uninstall the plugin from the Plugins Manager. SSH into your pi.
Run source ~/oprint/bin/activate
Clone my branch anywhere on the pi and cd into that directory. Then run octoprint dev plugin:install
and that will install the plugin. I restart the octoprint server in-between code changes and for anything done to setup.py like additional libraries you need to re-install the plugin with the above command.
Make sure you reload your browser cache if you are changing any of the menu options because they wont appear if you dont. Also all your previous setting should remain so you wont have to redo your api keys or anything.
Most of the code for the image upload I stole from https://github.com/OctoPrint/OctoPrint-Pushbullet/ so that is a great place to start.
If you are looking for a project 3 things come to mind. We should remove the image we are storing in the tmp directory after the image is sent to cloudinary http://docs.python.org/library/os.html#os.remove.
Also someone asked if they could get snapshots of progress at specific intervals. The pushbullet repo has that functionality as well.
And we don't have a test button in the settings for the plugin but that is a bit harder logic to implement.
I've seen the tutorial for a 'new plugin', I just haven't figured out how to 'overlay' an existing plugin on my working Pi box. I want to make a couple changes to this plugin and also develop one of my own, but I'm hijacking this issue so I can ask you for the help :)
Agree, those are three good starting points to help with this project. uninstalling and dev plugin:install
is what I was missing. I'll be back once I have some time to fiddle with it.
So I stopped getting images after a few days.
When it was working.
I'm going to look into it when I get time.