cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

stone_validators.ValidationError

stone_validators.ValidationError

markham
New member | Level 2

Has anyone else experienced the error dropbox.stone_validators.ValidationErrror: expected type SharedLink, got integer? I got this on line 484 of dropbox/stone_validators.py

 

These recent updates have kind of broken things and I am just trying to get everything back to a semi stable state.

 

Ideas?

 

This is running in Python 3 on Pythonista on an iPhone 8+ running iOS 11.0.2

5 Replies 5

Greg-DB
Dropbox Staff

Thanks for the report, and apologies for the trouble!

 

It looks like the API v2 Python SDK v8.3.0 release changed the positional ordering of arguments for the files_list_folder method, unintentionally breaking any callers relying on the parameters' order.

 

We'll look into fixing this on our side, but the best solution right now is to switch to named parameters, e.g., instead of something like:

 

dbx.files_list_folder("", False)

 

do something like this instead:

 

dbx.files_list_folder(path="", recursive=False)

 

Greg-DB
Dropbox Staff

We've corrected the ordering in v8.3.1 so that developers don't need to update their code when upgrading from 8.2. (If you have already done so though, you will need to revert that change, or, preferably, switch to using named parameters. Apologies for again for the bother.)

jyotinarang
Explorer | Level 4

Hi,

 

I get another error using a files_list_folder in python which states that -

dropbox.stone_validators.ValidationError: expected type SharedLink, got string - could you suggest why this is happening?

 

 

Greg-DB
Dropbox Staff

@jyotinarang You're getting a slightly different error than what was originally reported on this thread, so you're likely hitting a different issue.

 

It sounds like you're providing a string to the 'shared_link' arg, instead of a SharedLink instance. That is, instead of doing something like this:

 

shared_link_url = "..."
res = dbx.files_list_folder(path="", shared_link=shared_link_url)

 

 

You need to do something like this:

 

shared_link_url = "..."
res = dbx.files_list_folder(path="", shared_link=dropbox.files.SharedLink(url=shared_link_url))

 

If that doesn't seem to be the problem, please open a new thread with the details, e.g., the code you're using to reproduce the issue, and we'll take a look.

 

jyotinarang
Explorer | Level 4

Thanks Greg.

 

This worked for me. This was hard to figure out on my own though.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    jyotinarang Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?