I have a rclone process running with rclone rcd --rc-no-auth
I cannot mount using python remote control:
rclone = Rclone()
res = rclone.rpc("mount/mount", fs="lakefs:apple",
mountPoint="/dev/shm/tmp")
print(res)
When run this code I get {} and not error. But when I try to ls /dev/shm/tmp I get: ls: cannot access 'tmp': Transport endpoint is not connected
If I use rclone rc mount/mount fs="lakefs:apple" mountPoint="/dev/shm/tmp" then I can browse /dev/shm/tmp as expected. My lakefs is a S3 compatible server
There is no error nor message in rclone rc
Other weird symptom: once I mount with rclone rc mount/mount fs="lakefs:apple" mountPoint="/dev/shm/tmp", I can list mount with rclone rc mount/listmounts but the python equivalent give {}
Run the command 'rclone version' and share the full output of the command.
I built rclone after a git checkout v1.63.1 with go build
The librclone.so is built with go build --buildmode=c-shared -o librclone.so github.com/rclone/rclone/librclone
When I tried go build --buildmode=c-shared -o librclone.so : I get a librclone.so without error. But when I use that file with python binding I get: AttributeError: /home/user/softs/rclone/librclone.so: undefined symbol: RcloneRPC
I am not sure how to build librclone.so from the local git folder nor how to download one
Ooh right. In my use case, I want the mount to stay until the next unmount command, not until the python script end, similar to the behavior of "rclone rc mount/mount" which return right away. How do I achieve that with python ?
I do have a rclone rcd running all the time in another terminal in the example above.
What I did not get is that in python, the mount only last the time the python script is alive while the rclone rc return right away with the mount happening .
What is the pro/cons using python+librclone.so versus python+requests ? Does rclone rc use HTTP get/post behind the scene ? Or something more efficient ?
I finally got it now: rclone inside python script run as a standalone rclone process, independently to other rclone instance if any ... The rclone in python use the same API syntax as rclone rc.
I though the python rclone is doing the same thing as rclone rc and communicate with a running rclone rcd
In my use case, where I need to leave the mount point alive, I will probably start rclone rcd first, then use python requests to do the mount/unmount subsequently.