richard-better / pushbullet.py

A python client for http://pushbullet.com
MIT License
575 stars 110 forks source link

upload_file() does not work with python 3.4.2 #121

Closed baget closed 6 years ago

baget commented 7 years ago

the example of upload file using update_file() function does not work on python 3.4.2 if changing the python to 2.7.9 the same code works

the error that I'm getting:

Traceback (most recent call last):
  File "./sendpic.py", line 15, in <module>
    file_data = pb.upload_file(pic, "picture.jpg")
  File "/usr/local/lib/python3.4/dist-packages/pushbullet/pushbullet.py", line 203, in upload_file
    file_type = get_file_type(f, file_name)
  File "/usr/local/lib/python3.4/dist-packages/pushbullet/filetype.py", line 4, in _magic_get_file_type
    return file_type.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
tsvi commented 7 years ago

This issue was fixed in 0.11 Please try upgrading and see if this is still an issue