Data transfer between Wekeo drive and JupyterHub
What happened?
https://help.wekeo.eu/en/articles/6796717-how-to-use-wekeo-drive-for-sharing-data-or-work-between-users
I have followed the description, but step 4 did not work for me!
What are the steps to reproduce the bug?
from webdav3.client import Client options = { 'webdav_hostname': 'xxx', 'webdav_login': 'xxx', 'webdav_password': 'xxx', } client = Client(options) client.list()
Reply: below
Version
earthkit ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/earthkit'] 0.4.2 numpy ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/numpy'] 1.26.4 xarray ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/xarray'] 2024.2.0 pandas ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/pandas'] 2.2.1 geopandas ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/geopandas'] 0.14.3 matplotlib ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/matplotlib'] 3.7.1 cartopy ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/cartopy'] 0.22.0 rasterio ['/home/jovyan/.conda-libs/earthkit/lib/python3.10/site-packages/rasterio'] 1.3.9 cdsapi 0.6.1
Platform (OS and architecture)
Windows 11 Pro
Relevant log output
---------------------------------------------------------------------------
ResponseErrorCode Traceback (most recent call last)
Cell In[4], line 7
1 options = {
2 'webdav_hostname': 'xxx',
3 'webdav_login': 'xxx',
4 'webdav_password': 'xxx#drive',
5 }
6 client = Client(options)
----> 7 client.list()
File ~/.conda-libs/earthkit/lib/python3.10/site-packages/webdav3/client.py:67, in wrap_connection_error.<locals>._wrapper(self, *args, **kw)
65 log.debug("Requesting %s(%s, %s)", fn, args, kw)
66 try:
---> 67 res = fn(self, *args, **kw)
68 except requests.ConnectionError:
69 raise NoConnection(self.webdav.hostname)
File ~/.conda-libs/earthkit/lib/python3.10/site-packages/webdav3/client.py:264, in Client.list(self, remote_path, get_info)
261 raise RemoteResourceNotFound(directory_urn.path())
263 path = Urn.normalize_path(self.get_full_path(directory_urn))
--> 264 response = self.execute_request(action='list', path=directory_urn.quote())
265 if get_info:
266 subfiles = WebDavXmlUtils.parse_get_list_info_response(response.content)
File ~/.conda-libs/earthkit/lib/python3.10/site-packages/webdav3/client.py:230, in Client.execute_request(self, action, path, data, headers_ext)
228 raise MethodNotSupported(name=action, server=self.webdav.hostname)
229 if response.status_code >= 400:
--> 230 raise ResponseErrorCode(url=self.get_url(path), code=response.status_code, message=response.content)
231 return response
ResponseErrorCode: Request to https://wekeo-files.prod.wekeo2.eu/remote.php/dav/files/gritkr/ failed with code 401 and message: b'<?xml version="1.0" encoding="utf-8"?>\n<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">\n <s:exception>Sabre\\DAV\\Exception\\NotAuthenticated</s:exception>\n <s:message>No public access to this resource., Username or password was incorrect, No \'Authorization: Bearer\' header found. Either the client didn\'t send one, or the server is mis-configured, Username or password was incorrect</s:message>\n</d:error>\n'
Accompanying data
No response
Organisation
No response
Unfortunately, I cannot see how this issue is related to earthkit. The code referred to above does not seem to use earthkit at all.
Unrelated bug report.
Could you please indicate the correct location for this problem or assign the problem to the correct location?
I dont recognise this software as something that ECMWF maintains. Have you tried webdav?