You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

morranjuke's avatar
morranjuke
Explorer | Level 3
11 months ago

Folder path not found?

Happy Weekend all. Hope you're doing well. I'm aiming to generate image url from dropbox using Development feature. I faced a challenge where the folder path is not found. I'm sure that the folder path is correct and all the images are located in that folder. Here is my snippet code in Python:

Unfortunately, I can't show the access token for you. Please find the output below.

 

 

 Would you mind share your thoughts and suggestions to me? Thank you and have a great weekend!

  • Hi morranjuke,

    Such thing could happen for variety of reasons. The information you provided is not enough for limiting them.

    To be aware where you're going on, start with empty string as a path when listing the folder and navigate to the right direction. Your path may be correct, but it's not clear where your API is rooted currently (there are variety of options); unexpected rooting may make you correct path become incorrect!

    When constructing your file path, you use OS related path join; that's NOT always correct and can be reason for such a message. Keep in mind that you're constructing Dropbox path, not path to some local file (in your OS)! Make sure you're using POSIX path join or construct it as a string (slash separator, not backslash or something else - the same rule as for your folder path). Even more, to avoid any error and use correct path formatting, better use the path in metadata (in listing result - not the name) instead of constructing yourself (the path there should be ready for use) or use the file ID on link creation.

    Other error you may expect  is when a link already exists. You haven't handled such a case in any way. The exception thrown may contain existing link (in such a case you can just grab it) or you may need to take it explicitly with listing direct link (when missing in the exception).

    Hope this gives directions.

     

    PS: If the application you're working on is "LEGO image for PBI Dashboard" and that folder is not some just existing - left from other application, your path is incorrect definitely. 🙂 In such a case you have to use just "/Image" as path! App folder type applications use the application specific folder as API root and all path are relative to that folder. 😉

  • Hi morranjuke,

    Such thing could happen for variety of reasons. The information you provided is not enough for limiting them.

    To be aware where you're going on, start with empty string as a path when listing the folder and navigate to the right direction. Your path may be correct, but it's not clear where your API is rooted currently (there are variety of options); unexpected rooting may make you correct path become incorrect!

    When constructing your file path, you use OS related path join; that's NOT always correct and can be reason for such a message. Keep in mind that you're constructing Dropbox path, not path to some local file (in your OS)! Make sure you're using POSIX path join or construct it as a string (slash separator, not backslash or something else - the same rule as for your folder path). Even more, to avoid any error and use correct path formatting, better use the path in metadata (in listing result - not the name) instead of constructing yourself (the path there should be ready for use) or use the file ID on link creation.

    Other error you may expect  is when a link already exists. You haven't handled such a case in any way. The exception thrown may contain existing link (in such a case you can just grab it) or you may need to take it explicitly with listing direct link (when missing in the exception).

    Hope this gives directions.

     

    PS: If the application you're working on is "LEGO image for PBI Dashboard" and that folder is not some just existing - left from other application, your path is incorrect definitely. 🙂 In such a case you have to use just "/Image" as path! App folder type applications use the application specific folder as API root and all path are relative to that folder. 😉

    • morranjuke's avatar
      morranjuke
      Explorer | Level 3
      Hi @Здравко, thanks for your advice! Let me try your suggestion and come back to you as soon as possible
    • morranjuke's avatar
      morranjuke
      Explorer | Level 3

      Hi @Здравко,

      Thanks for your advice! Let me try and come back to you as soon as possible.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,914 PostsLatest Activity: 2 hours ago
333 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!