
OK, after about 4 hours of troubleshooting, I finally figures out that I need to open the file as binary with 'rb' instead of 'r'.
filedata = open(btor['filepath'],'rb')
Hello,
I'm using pypodio in a python script that I'm running locally, Windows 8 with Python 2.7. I'm able to authenticate and create new items, and was able to successfully upload a 1.3MB text file.
When I try to upload a DOCX file created by MS Word 2013 however, my script just hangs at the command line. I can replicate with DOCX files, but other files upload fine, regardless of size. DOCX files just hang when uploading - no feedback or errors.
Podio = api.OAuthClient(client_id,client_secret,username,password)
filename = btor['filename']
filedata = open('get-pip.txt','r')
#filedata = open('get-pip.txt','r')
upload = Podio.Files.create(filename,filedata)
Thanks,
Joe
Please sign in to leave a comment.
OK, after about 4 hours of troubleshooting, I finally figures out that I need to open the file as binary with 'rb' instead of 'r'.
filedata = open(btor['filepath'],'rb')