Oxen-AI / Oxen

Oxen.ai's core rust library, server, and CLI
https://oxen.ai
Apache License 2.0
176 stars 11 forks source link

I can ls remote repo but can't use Python API to do the samething. #271

Closed NoahAmethyst closed 6 months ago

NoahAmethyst commented 6 months ago

I deployed oxen server in my own server machine and try to get remote repo's directry and files.

Here's what i input and response:

image image

But when i use python API like this:

    remote_repo = oxen.RemoteRepo(repo_id, local_host, revision='origin', scheme='http')
    print(remote_repo.ls(''))

I got error: ValueError: Err: resource_not_found

When i put images in the ls function as first param the same error happened.

Any suggestions please tell me.

THX.

benartuso commented 6 months ago

@NoahAmethyst thanks for opening!

I noticed that your revision param is being passed in as origin, which is our default remote name. This param should be a branch or commit id, not a remote name.

Are you still seeing the same error if you pass in

remote_repo = oxen.RemoteRepo(repo_id, local_host, revision='main', scheme='http')

instead?

NoahAmethyst commented 6 months ago

@NoahAmethyst thanks for opening!

I noticed that your revision param is being passed in as origin, which is our default remote name. This param should be a branch or commit id, not a remote name.

Are you still seeing the same error if you pass in

remote_repo = oxen.RemoteRepo(repo_id, local_host, revision='main', scheme='http')

instead?

That's worked!THX for your reponse!

NoahAmethyst commented 6 months ago

It's solved