I'm trying to upload a file to Dropbox, it produces an error. The code I am using is the following:
import dropbox
dbx = dropbox.Dropbox('mi_codigo_de_dropbox')
nombreArchivo = 'Reporte 49.docx'
path = '/machineAR/' + nombreArchivo
with open(nombreArchivo, 'r') as f:
dbx.files_upload(f.read(), path)
What happens is that the% .read()
module throws me the following error:
'utf-8' codec can't decode bytes in position 10-11: invalid continuation type
I've already tried several types of files, .docx empty and even with .png files and it does not work.
Thank you very much in advance.