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

Pushover send error: 400: attachment is too large #119

Open
andreapede opened this issue May 4, 2021 · 0 comments
Open

Pushover send error: 400: attachment is too large #119

andreapede opened this issue May 4, 2021 · 0 comments

Comments

@andreapede
Copy link

In some case the image size could exceed the maximum allowed for sending 2.5mb
https://blog.pushover.net/posts/pushing-images-with-pushover-30#:~:text=Starting%20today%2C%20these%20e%2Dmails,are%20limited%20to%202.5%20megabytes.

2021-05-04 10:52:26,532 - octoprint.plugins.Octoslack - ERROR - Pushover send error: 400: attachment is too large (2700920 bytes is more than 2621440 limit
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_Octoslack/__init__.py", line 3729, in send_slack_message
    html=1,
  File "/home/pi/oprint/lib/python3.7/site-packages/pushover_complete/pushover_api.py", line 199, in send_message
    callback_url, timestamp, sound, html)
  File "/home/pi/oprint/lib/python3.7/site-packages/pushover_complete/pushover_api.py", line 154, in _send_message
    return self._generic_post('messages.json', payload=payload, session=session, files=attachment)
  File "/home/pi/oprint/lib/python3.7/site-packages/pushover_complete/pushover_api.py", line 88, in _generic_post
    raise BadAPIRequestError('{}: {}'.format(resp.status_code, ': '.join(resp_body.get('errors'))))
pushover_complete.error.BadAPIRequestError: 400: attachment is too large (2700920 bytes is more than 2621440 limit

It is possible to find some workaround like additional jpg compression or limitating the maximum size?
(great plugin tought)

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

1 participant