Skip to content

Cannot send image files. #11

@xbot

Description

@xbot

File "./abc.py", line 23, in send_alert
pb.push(file=image)
File "/usr/lib/python2.7/site-packages/pushybullet.py", line 1292, in push
push.bind(self).send(target)
File "/usr/lib/python2.7/site-packages/pushybullet.py", line 961, in send
target.api.upload(req['upload_url'], data=req['data'], file=fh)
File "/usr/lib/python2.7/site-packages/pushybullet.py", line 1144, in upload
response = self.sess.post(_uri, data=data, files=files, auth=()).raise_for_status()
File "/usr/lib/python2.7/site-packages/pushybullet.py", line 87, in post
return self._request('POST', url, params=params, data=data, files=files, auth=auth, headers=headers)
File "/usr/lib/python2.7/site-packages/pushybullet.py", line 159, in _request
content_type, _data = self._encode_form_data(p for n in (data, files) for p in n.iteritems())
File "/usr/lib/python2.7/site-packages/pushybullet.py", line 120, in _encode_form_data
return 'multipart/form-data; boundary="%s"' % boundary, ('--%s\r\n' % boundary) + ('\r\n--%s\r\n' % boundary).join(body) + ('\r\n--%s--\r\n' % boundary)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 183: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions