Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data transfer between Wekeo drive and JupyterHub #35

Open
gritk opened this issue Apr 8, 2024 · 4 comments
Open

Data transfer between Wekeo drive and JupyterHub #35

gritk opened this issue Apr 8, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@gritk
Copy link

gritk commented Apr 8, 2024

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

@gritk gritk added the bug Something isn't working label Apr 8, 2024
@sandorkertesz
Copy link
Collaborator

Unfortunately, I cannot see how this issue is related to earthkit. The code referred to above does not seem to use earthkit at all.

@tlmquintino
Copy link
Member

Unrelated bug report.

@gritk
Copy link
Author

gritk commented Apr 9, 2024

Could you please indicate the correct location for this problem or assign the problem to the correct location?

@tlmquintino
Copy link
Member

I dont recognise this software as something that ECMWF maintains. Have you tried webdav?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants