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

Forum Discussion

anonymous's avatar
anonymous
5 years ago

System.AggregateException path/not_found

I am trying to builg a simple app to extract a file from dropbox and save it on my computer. I have verified the token, the files exist on dropbox, it's location and the directory on my computer. 

The code I have put together keeps giving me an error "path/not_found/"

Any assistance would be greatly apprecaited.

Thank you in advance,

I am a beginner so I hope this post is in the right place....APiException path/not_found

  • A 'path/not_found' error like this indicates that there was nothing found in the connected account at the path specified by the app. In this case, that's specified by the parameter value you're giving to the DownloadAsync method, which you're building from `folder + "/" + file`.

    Those actual values are mostly redacted from your screenshot, but I do see that you have "?dl=1" at the end of your `file` value. Unless you actually have at the end of the filename of the file in your account, you shouldn't be appending that. That's just an option for use with shared links, not for file paths themselves.

    Also, note that if your app is registered for the "app folder" permission, all file paths will automatically be interpreted relative to the special app folder automatically made for your app, inside "/Apps" by default. In that case, make sure the file(s) you're trying to work with are actually inside that app folder.

    You can use the ListFolderAsync/ListFolderContinueAsync methods to list the contents, if any, of the root folder, by starting with a 'path' value of the empty string "". That way you can get the actual Metadata.PathLower value for downloading a file with DownloadAsync.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    A 'path/not_found' error like this indicates that there was nothing found in the connected account at the path specified by the app. In this case, that's specified by the parameter value you're giving to the DownloadAsync method, which you're building from `folder + "/" + file`.

    Those actual values are mostly redacted from your screenshot, but I do see that you have "?dl=1" at the end of your `file` value. Unless you actually have at the end of the filename of the file in your account, you shouldn't be appending that. That's just an option for use with shared links, not for file paths themselves.

    Also, note that if your app is registered for the "app folder" permission, all file paths will automatically be interpreted relative to the special app folder automatically made for your app, inside "/Apps" by default. In that case, make sure the file(s) you're trying to work with are actually inside that app folder.

    You can use the ListFolderAsync/ListFolderContinueAsync methods to list the contents, if any, of the root folder, by starting with a 'path' value of the empty string "". That way you can get the actual Metadata.PathLower value for downloading a file with DownloadAsync.

    • anonymous's avatar
      anonymous

      Greg,

      Thank you so very much for the explanation!