I’m using pyBIS to query my data in a non-productive local openBIS installation running via docker & kubernetes. I can retrieve and add objects/samples, however, once I move on to datasets that I’ve added in the ELN (various functions and properties, e.g. file_list or save()) I keep getting the same error:
Exception in thread Thread-5 (upload_file): Traceback (most recent call last): File "/opt/conda/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/opt/conda/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/opt/conda/lib/python3.10/site-packages/pybis/dataset.py", line 1062, in upload_file resp = requests.post(upload_url, data=f, verify=verify_certificates) File "/opt/conda/lib/python3.10/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) File "/opt/conda/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/opt/conda/lib/python3.10/site-packages/requests/sessions.py", line 573, in request prep = self.prepare_request(req) File "/opt/conda/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request p.prepare( File "/opt/conda/lib/python3.10/site-packages/requests/models.py", line 368, in prepare self.prepare_url(url, params) File "/opt/conda/lib/python3.10/site-packages/requests/models.py", line 439, in prepare_url raise MissingSchema( requests.exceptions.MissingSchema: Invalid URL '/datastore_server/session_workspace_file_upload?filename=abc.jpg&id=1&startByte=0&endByte=0&sessionID=admin-123': No scheme supplied. Perhaps you meant http:///datastore_server/session_workspace_file_upload?filename=abc.jpg&id=1&startByte=0&endByte=0&sessionID=admin-13?
Do you know what and why it is happening there? I was wondering if the requests API has changed since you’ve released pyBIS for Python 3.3 initially.
I’m using Python 3.10 in JupyterHub. I should add that I don’t have a dss mounted; however I do have access to the whole openbis folder including the dss locally. What would be the correct way to integrate it into pybis without using “mount” and sshfs, respectively? I’ve instead written my own “mount_local” method that sets the mountpoint to a local folder:
def mount_local(self, mountpoint): self.mountpoint = mountpoint return self.mountpoint setattr(pybis.Openbis, 'mount_local', mount_local) o = pybis.Openbis() o.mount_local("/home/jovyan/openbis/dss_store/")
Thank you for your help and for all your efforts in general!