镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

exists_file and exists_file_async never find a file: fullPath has no leading slash #1957

Open

Description

@JasperSelmanUiPath

BucketsService.exists_file and exists_file_async in uipath-platform return False for a file that is in the bucket.

Cause

Both methods add a leading / to blob_file_path and compare the result exactly with the fullPath of each file that ListFiles returns:

normalized_target = (
    blob_file_path if blob_file_path.startswith("/") else f"/{blob_file_path}"
)
...
if file.path == normalized_target:
    return True

Orchestrator returns fullPath without a leading /, so the paths never match and the method always returns False.

Reproduce

Upload a file to a storage bucket, then check for it:

from uipath.platform import UiPath

buckets = UiPath().buckets
buckets.upload(name="my-bucket", blob_file_path="data.csv", content="a,b\n", folder_path="Shared")
print(buckets.exists_file(name="my-bucket", blob_file_path="data.csv", folder_path="Shared"))   # False
print(buckets.exists_file(name="my-bucket", blob_file_path="/data.csv", folder_path="Shared"))  # False

ListFiles with the prefix /data.csv or data.csv does find the file, and reports fullPath as data.csv.

Seen with uipath-platform 0.2.32 on cloud.uipath.com. The code is unchanged in 0.2.41.

Expected

exists_file returns True when the bucket holds the file, with or without a leading / in blob_file_path. Comparing both paths without the leading / would do it, for example file.path.removeprefix("/") == blob_file_path.removeprefix("/").

Impact

Code that uploads a file only when it is missing overwrites the existing file every time. We work around it by listing the files ourselves (UiPath/vertical-solution-invoice-processing#2677).

Activity

  1. added a commit that references this issue on Oct 28, 2026
    ceb16e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions