Skip to content

Can't download sam modle in windows #1580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
withkun opened this issue Apr 23, 2025 · 0 comments
Open

Can't download sam modle in windows #1580

withkun opened this issue Apr 23, 2025 · 0 comments

Comments

@withkun
Copy link

withkun commented Apr 23, 2025

Provide environment information

Python 3.12.9
labelme==5.8.1
osam==0.2.3

What OS are you using?

Windows11

Describe the Bug

When download sam model, osam use hash as local file name, but hash contains ":" and can't as file name in windows.

osam/types/_blob.py
class Blob:
url: str
hash: str

@property
def path(self):
    return os.path.expanduser(f"~/.cache/osam/models/blobs/{self.hash}")

Expected Behavior

may fix as:

class Blob:
url: str
hash: str

@property
def path(self):
    return os.path.expanduser(f"~/.cache/osam/models/blobs/{self.url.split("/")[-1]}")

To Reproduce

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant