cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more 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: 

Re: Dropbox API error with 500

Dropbox API error with 500

bszt123
Helpful | Level 5

Greetings,

 

I am encountering the following error while calling the Dropbox API:

 

InternalServerError('6c7329b49922471380831b2b3f2fb49c', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}')

 

Below is the Python code for the API call:

self.dbx = dropbox.Dropbox(self.app_token).with_path_root(dropbox.dropbox_client.PathRoot.root('8297511184')) result = self.dbx.files_list_folder(path)

 

I would like to request clarification on the cause of the above error.

 

Best regards,

SangWoon Yoon

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff

Yes, that error indicates an issue with the value passed to as_user. The as_user method requires a team member ID, not an email address. You can get team member IDs from team_members_get_info_v2 or team_members_list_v2 and team_members_list_continue_v2, for example.

View solution in original post

14 Replies 14

Greg-DB
Dropbox Staff

Thanks for the report. We'll be happy to look into this, but we could use more samples. (Unfortunately just one like you have here isn't always sufficient.)

 

Can you share several more (5-10) samples of the output showing the failure like this? The request IDs in that output should be helpful. Thanks in advance!

bszt123
Helpful | Level 5

Thank you for your help. I'll share some similar case below:

 

----- InternalServerError('42e7053b316244c6aa1c4a0bbf0dc73a', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}') -----

 

----- InternalServerError('97748957576e4242917039b7ea388845', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}') -----

 

----- InternalServerError('c6773078d4d845f2b5fca97aedd959f4', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}') -----

 

----- InternalServerError('0be0422b77d54c1390c74dd9d1c7877c', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}') -----

 

----- InternalServerError('4346a5d44d954ec68f8a5bf9383dba76', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}') -----

 

----- InternalServerError('4713094d90804c85866201a5e575f26c', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}') -----

 

----- InternalServerError('bc4e6866de6c4b78b61fb25c3de24b53', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}') -----

bszt123
Helpful | Level 5

And I also received the following email on April 29th. I'm curious if this is related to the current issue.

 

On April 29th, an update will be made to help the entire team find and organize files more easily. Here are the key points of this update: All files will be stored in folders • To maintain the organization of the team, all files will be stored in folders.

• Team members can add files to folders they have access to by selecting 'Upload' or 'Create' at the top level of the team space.

Team members can only see folders they can access at the top level • The folder list has been redesigned to make it easier to find files and to display only files relevant to each team member.

New team folders are not shared with everyone by default • By default, when creating a folder, the owner (or team administrator) is prompted to choose who to share the folder with to control team access more efficiently.

• Right-click on the desktop, select Create folder and share to create a new folder. Then, you can choose who to share this folder with.

A new compression archiving feature has been added • You can archive infrequently used team folders to free up storage space and maintain organization.

• Archiving a folder removes access for team members.

• Archived folders can be found in the content tab of the management console.

If you have any questions about this update, please reply to this email.

 

Greg-DB
Dropbox Staff

Thanks, that's helpful. We'll look into it and follow up here with any updates on this.

 

For reference though, it looks like you're referring to using an account with a team space, so make sure you're setting the correct namespace ID for the account's current root. You can find information on how to use that in the Team Files Guide.

bszt123
Helpful | Level 5

Thank you for your assistance. An error with the Dropbox API is causing a critical issue for our service. We hope this issue can be resolved promptly. Thanks again.

Greg-DB
Dropbox Staff

Engineering is looking into this and I'll follow up here once I have any news for you.

 

Were you able to check that you're passing the correct root value for the account as noted in my previous message though? It looks like this error may be related to that, so make sure you're setting the right value as that may avoid the error.

Greg-DB
Dropbox Staff

Update: we confirmed this is related to sending an incorrect root for the account; in some cases the server would return a 500 instead of the expected 422 error. We've fixed that so it should be returning the proper 422 now. Please refer to the "Path Root Header Modes" documentation for information on that.

bszt123
Helpful | Level 5

Thank you for the response.

Here is the code we are currently using to call the API:

self.dbx = dropbox.DropboxTeam(self.app_token).as_user(some_id) root_namespace_id = self.dbx.users_get_current_account().root_info.root_namespace_id result = self.dbx.files_list_folder(path)

When calling self.dbx.users_get_current_account(), we encounter the following error:

dropbox.exceptions.InternalServerError: InternalServerError('5fe3180d6a9a4c64a0e319c78f7693a7', 500, '')

Could you explain this issue? And if possible, please provide the correct method to call this.

Greg-DB
Dropbox Staff

Is that all of the actual relevant code you're running? I notice you don't seem to be using the 'root_namespace_id' value anywhere. Are you calling with_path_root? Please share any other relevant pieces of code.

 

Also, please share several more (5-10) current error outputs like this so we can look into what you're currently running in to. (Just one request ID like this unfortunately isn't always sufficient.)

Need more support?