cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
If you’ve changed your email address, now's the perfect time to update it on your Dropbox account and we’re here to help! Learn 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: Tagging Folder

Re: Tagging Folder

prabhat1999
Explorer | Level 3

I write a code to get the data of the tags listed on a folder. but when I hit the API


I get error stating
Failed to get tags: 409 - {"error_summary": "path/not_file/...", "error": {".tag": "path", "path": {".tag": "not_file"}}}

i also try to run the function

dropbox.files_tags_get(entry.path_display)

 

but gets error
AttributeError: module 'dropbox' has no attribute 'files_tags_get'
what will be the solution for this? how can I read the tags of a folder?

2 Replies 2

Здравко
Legendary | Level 20

@prabhat1999 wrote:

...
I get error stating
Failed to get tags: 409 - {"error_summary": "path/not_file/...", "error": {".tag": "path", "path": {".tag": "not_file"}}}

...


Hi @prabhat1999,

If you take a look to the documentation:


...
not_file Void We were expecting a file, but the given path refers to something that isn't a file.

In this context, are you sure the path in use denotes a file and not something else (and all of this is in context of correct call - not call to another access point that does support only files)?

 


@prabhat1999 wrote:

...

i also try to run the function

dropbox.files_tags_get(entry.path_display)

but gets error
AttributeError: module 'dropbox' has no attribute 'files_tags_get'
...


Where does your 'dropbox' object come from? 🤔 Is it a real Dropbox client object? 🧐 Or just you have used the imported dropbox module. 🙂 The mentioned 'attribute' is (or rather would be) part of client object. Do read the documentation more careful!

Hope this gives direction.

Greg-DB
Dropbox Staff

@prabhat1999 Make sure you're supplying a valid path. For example, make sure your path doesn't end with a "/". It looks like there's a bug where the server incorrectly returns a ''malformed_path' error as 'not_file'. I'll ask the team to fix that up, but you can avoid that by supplying a properly formatted path. Update: this should now be properly returning a "path/malformed_path" error.

 

Also, as Здравко noted, when using the Python SDK, you need a Dropbox client object to make calls like files_tags_get. You can find the documentation for making a Dropbox object here, as well as examples here.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?