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

Broken argopy link #57

Open
gmaze opened this issue Aug 19, 2024 · 7 comments
Open

Broken argopy link #57

gmaze opened this issue Aug 19, 2024 · 7 comments

Comments

@gmaze
Copy link
Member

gmaze commented Aug 19, 2024

Hi Gael,
Looking at the last release, I noticed that the first argopy link at:
https://gaelforget.net/notebooks/Argo_argopy.html
is broken
it could point toward: https://github.com/euroargodev/argopy

@gaelforget
Copy link
Member

gaelforget commented Aug 19, 2024

For context : the html that was linked in the docs is the last one I managed to make work.

Update : I updated the GitHub link to https://github.com/euroargodev/argopy#readme and resurrected running the notebook example

But : the test case returns this error :

julia> argopy=ArgoData.pyimport(:argopy)
PyObject <module 'argopy' from '/Users/gaelforget/.julia/conda/3/aarch64/lib/python3.10/site-packages/argopy/__init__.py'>

julia> ds_fetcher=argopy.DataFetcher().float([6902746, 6902747, 6902757, 6902766])
PyObject <datafetcher.erddap>
Name: Ifremer erddap Argo data fetcher for floats
API: https://erddap.ifremer.fr/erddap
Domain: WMO6902746;WMO6902747;WMO6902757;WMO6902766
Performances: cache=False, parallel=False
User mode: standard
Dataset: phy

julia> ds_points = ds_fetcher.to_xarray()
ERROR: PyError ($(Expr(:escape, :(ccall(#= /Users/gaelforget/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'aiohttp.client_exceptions.ClientConnectorCertificateError'>
ClientConnectorCertificateError(ConnectionKey(host='erddap.ifremer.fr', port=443, is_ssl=True, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)'))
  File "/Users/gaelforget/.julia/conda/3/aarch64/lib/python3.10/site-packages/argopy/fetchers.py", line 490, in to_xarray
    xds = self.fetcher.to_xarray(**kwargs)
...

How can we fix this issue?

ps. I also get this error on MAC arm64, but the above ran via GitHub action on linux
pps. the argopy docs also seems to fail with erddap here and here; not sure if its the same error though

@gmaze
Copy link
Member Author

gmaze commented Aug 20, 2024

Hi @gaelforget
I identified the issue a few weeks ago
this has to do with some recent updates in xarray
apparently, everything works ok for xarray < 2024.3
I'm working on fixing the issue and making argopy compatible with the most recent xarray versions
this should be available with the next 0.1.16 argopy release

@gmaze
Copy link
Member Author

gmaze commented Aug 20, 2024

while pydata/xarray#8909 is not solved we have to use xarray < 2024.3

@gaelforget
Copy link
Member

Hi @gaelforget I identified the issue a few weeks ago this has to do with some recent updates in xarray apparently, everything works ok for xarray < 2024.3 I'm working on fixing the issue and making argopy compatible with the most recent xarray versions this should be available with the next 0.1.16 argopy release

Thanks for explaining. Will keep an eye out for 0.1.16 and try again when it's out

@gaelforget
Copy link
Member

while pydata/xarray#8909 is not solved we have to use xarray < 2024.3

I don't know how to do modify the install / use instruction of argopy to do this.

Is there an argument that you can pass to pip install argopy or conda install to impose such restriction at install time? or an argument to import or DataFetcher to select xarray 2024.3 at run time?

If we can do this in python then we should be able to modify one of the relevant lines of Julia below :

Conda.add("argopy")

PyCall.pyimport("argopy")

ds_points = ds_fetcher.to_xarray()

I generally expect that dependencies enforce their own dependency compatibility restrictions. In Julia that's handled by the compat section in Project.toml. For Python / argopy I see it's done in requirement.txt

https://github.com/euroargodev/argopy/blob/289a4aa8391cb4cf08a605bbe4dc23a945e9081b/requirements.txt#L1

I tried pip install git+http://github.com/euroargodev/argopy.git@master but then import argopy fails for me. Also I don't know that I can pip install from github via Conda.jl. So I think I need to wait for argopy 0.1.16 to be released.

@gmaze
Copy link
Member Author

gmaze commented Aug 20, 2024

Indeed the restriction on xarray is done by requirements.txt
So installing argopy from the repo master branch with pip should make it
but that won't be as clean as a conda install, and for that you indeed need to wait for the next release

@gmaze
Copy link
Member Author

gmaze commented Aug 21, 2024

rq:
if xarray > 2024.3 is installed before argopy, then I'm not sure pip will raise an error despite the requirements.txt
you may need to check when you install xarray
with pip you can pin a version or an upper bound with:
pip install xarray < 2024.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants