We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
sparkie127
5 years agoExplorer | Level 3
files_list_folder encoding issue
I've tried to use the sample code provided in other discussions to no avail.
#!/usr/bin/env python
import dropbox
dbx = dropbox.Dropbox("***TOKEN*GOES*HERE***")
myDir = dbx.files_list_folder...
- 5 years ago
This code looks correct, and doesn't fail for me when I plug in my own access token.
Looking at the stack trace, it appears to be failing when making the request, specifically when writing a particular header. The only header here that would be varying though is the Authorization header with your access token. Also, the character it's failing on seems to be the unicode character for an em dash. So, it sounds like your access token string has unicode in it, when it should only contain ASCII. (Perhaps you opened or saved it in a text editor that automatically performed some conversion?)
To fix this, replace any non-ASCII characters in your access token with the correct ASCII character, such as the ASCII dash "-", or just get a new access token and use it as is.
Greg-DB
Dropbox Staff
This code looks correct, and doesn't fail for me when I plug in my own access token.
Looking at the stack trace, it appears to be failing when making the request, specifically when writing a particular header. The only header here that would be varying though is the Authorization header with your access token. Also, the character it's failing on seems to be the unicode character for an em dash. So, it sounds like your access token string has unicode in it, when it should only contain ASCII. (Perhaps you opened or saved it in a text editor that automatically performed some conversion?)
To fix this, replace any non-ASCII characters in your access token with the correct ASCII character, such as the ASCII dash "-", or just get a new access token and use it as is.
sparkie127
5 years agoExplorer | Level 3
That was the problem... My token had a em dash in it... Thank you!!!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,878 PostsLatest Activity: 6 hours agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!