Unable to Retrieve Certain Resources Using Foundry Platform SDK

I’m trying to retrieve a list of files within Foundry using the children method of the Foundry Platform SDK,
as documented here: https://github.com/palantir/foundry-platform-python/blob/develop/docs/v2/Filesystem/Folder.md#children

However, I encounter an error when the folder contains the following files
(removing these files resolves the error):

PDF file
Dashboard

How should I use the children method to retrieve these files?
Or should I be using a different method altogether?

It looks like BLOBSTER_PDF is missing from the resource type list at https://github.com/palantir/foundry-platform-python/blob/36fbc1b8e4babd0226a104dc97019ea6fbadc043/foundry/v2/filesystem/models.py#L628, causing a validation error. I’ll put in a pull request to fix that. So sorry for the trouble!

Can you confirm the specific error you see in the Dashboard case? I believe that FOUNDRY_CONTAINER_SERVICE_CONTAINER should be the resource type for a Streamlit / Dash dashboard, so I’m surprised that that case is causing issues.

Thank you for your reply.

The error confirmed in the dashboard case is as follows (the same applies to PDF files):

TypeError: ValidationError.new() missing 2 required positional arguments: 'title' and 'line_errors'

The dashboard was created as follows:

  1. Create a new Quiver analysis
  2. Select “Dashboards”
  3. Select “Publish”

Here is the RID of the created dashboard:
RID : ri.quiver.main.dashboard.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

I apologize for the addition, but the following files also encountered the same error:

tar file
RID : ri.blobster.main.archive.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

dat file
RID : ri.blobster.main.blob.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

jupyter file
RID : ri.blobster.main.jupyternotebook.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

mp4 file
RID : ri.blobster.main.video.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Graph template
RID : ri.opus.main.graph-template.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

MAP template
RID : ri.opus.main.map-template.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Time series sync
RID : ri.time-series-catalog.main.sync.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Since version 0.110.0, I have successfully retrieved the PDF, dashboard, and the following files. Thank you for the addition.

Would it be possible to add the following as well?

We’ll work on adding those as well - thank you for the reminder (and so sorry for the delayed acknowledgement on your previous post!)

Thank you for adding the Jupyter file and MAP template.
I was able to retrieve these files in version 1.3.0.

However, I encountered an error with the following file that was recently added.
Could this also be added?

Workflow
ri.flow..workflow.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Since new resource type files will likely be added in the future, I’m planning to output the filename and RID of the file that caused the error and then terminate the process.

Currently, I’m handling errors like this:

try:
    for folder in client.filesystem.Folder.children(
        folder_rid, preview=preview
    ):
except Exception as e:
    print("Failed to retrieve files under folder: %s\n" % folder.display_name)
    print("Type Error: %s\n" % e.__context__)
Failed to retrieve files under folder: FailedFolder
Type Error: 1 validation error for ListChildrenOfFolderResponse data.1.
type Input should be 'AIP_PROFILE', ... , 'WORKSHOP_MODULE' or 'WORKSHOP_STATE' [type=literal_error, input_value='FLOW_WORKFLOW', input_type=str]
For further information visit https://errors.pydantic.dev/2.11/v/literal_error

I can retrieve the folder name where the error occurred, but is there a way to get the filename and RID of the file that caused the error?
(In this case, the filename and RID of the FLOW_WORKFLOW file).