euroargodev / argopy

A python library for Argo data beginners and experts
https://argopy.readthedocs.io
European Union Public License 1.2
176 stars 38 forks source link

ArgoDocs is broken #351

Closed gmaze closed 3 months ago

gmaze commented 3 months ago

Since yesterday, ArgoDocs is broken (check CI upstream error here)

from argopy import ArgoDocs
ArgoDocs(35385).ris

raises the error:

TypeError                                 Traceback (most recent call last)
Cell In[14], line 2
      1 from argopy import ArgoDocs
----> 2 ArgoDocs(35385).ris

File ~/git/github/euroargodev/argopy/argopy/related/argo_documentation.py:141, in ArgoDocs.ris(self)
    138 file = self._fs.download_url("%s/%s" % (self._doiserver, self.js['doi']))
    139 x = re.search(r'<a target="_blank" href="(https?:\/\/([^"]*))"\s+([^>]*)rel="nofollow">TXT<\/a>',
    140               str(file))
--> 141 export_txt_url = x[1].replace("https://archimer.ifremer.fr/", self._archimer)
    142 self._risfile = export_txt_url
    143 self._ris = self.RIS(export_txt_url, fs=self._fs).record

TypeError: 'NoneType' object is not subscriptable

This is due to a recent update in the Archimer webpage design, we cannot anymore look for a link toward metadata !