I'm having some trouble with the python client, se...
# help
y
I'm having some trouble with the python client, see the thread
1
This is what my repository looks like, there's a weird extra empty path I think because when I ingested I had a trailing slash.
and then here's what I'm running, I'm able to list the branches so it is reachable:
but then when I try to get the objects: I tried with a few different combinations of adding slashes to the path and ref
this is just directly plugging into the documentation example code
y
Hey @Yusuf K! First of all, the weird slashes in the beginning of the path are indeed frustrating, and this issue is already fixed in the latest lakeFS version (0.62.0, fixed in this PR).
Regarding your specific problem, please allow me to try and reproduce it and I will get back to you soon
🙌🏽 1
y
Awesome, thank you!
y
@Yusuf K, one thing I noticed is that you're using the
get_object
method on a prefix. Note that get_object will only work on an object. If your intention is to list objects under, you should use
list_objects
, as in:
Copy code
api_instance.list_objects(repository, ref, prefix)
In this specific case, set prefix to be
/annotations/
y
Oh, my intention is to download all the objects under that annotations path into my local workspace
y
I see. In that case, you will have to list them first, iterate through the result, and use get_objects on every returned object.
y
I see okay, do you know off hand if under the hood the call is asynchronous?
y
Asynchronous in what sense?
The client call blocks until the response is returned from the server, but I'm not sure if that's what you're asking.
y
sorry, yeah never mind. I wanted to do get_objects asynchronously, but its only one object at a time anyways so making it asynchronous is on me. Sorry brain fart
y
haha 🙂 let me know if you need anything else!
y
thank you!