We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here. 

Forum Discussion

prabhat1999's avatar
prabhat1999
Explorer | Level 3
5 months ago

Re: Tagging Folder

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?

  • Здравко's avatar
    Здравко
    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's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox 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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,875 PostsLatest Activity: 2 months ago
325 Following

If 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!