Meta data forms not accessible!
I currently cannot access the MetaDataScheme
for any file!
MWE (Full traceback below):
#SETUP
import coscine
c = coscine.Client(TOKEN)
some_obj = c.projects()[0].resources()[0].objects()[0]
some_res = some_obj.resource
# Via file object:
some_obj.form()
>>> HTTPError: 404 Client Error: Not Found for url: https://coscine.rwth-aachen.de/coscine/api/Coscine.Api.Metadata/Metadata/profiles/https%3A%2F%2Fpurl.org%2Fcoscine%2Fap%2Fsfb1394%2FCalphadDB%2F/abb54be4-9e91-4242-98aa-5f1c883c0f9c
# Via resource:
some_res.MetaDataForm()
>>> HTTPError: 404 Client Error: Not Found for url: https://coscine.rwth-aachen.de/coscine/api/Coscine.Api.Metadata/Metadata/profiles/https%3A%2F%2Fpurl.org%2Fcoscine%2Fap%2Fsfb1394%2FCalphadDB%2F/abb54be4-9e91-4242-98aa-5f1c883c0f9c
I tried to downgrade to version 0.5.2 again, since I am sure it was working perfectly for that version. However, it does not work either. Thus, I assume it is related to some changes in the CoScInE backend?
Full stack trace:
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/client.py in _request(self, method, uri, **kwargs)
249 response = self.session.request(method, uri, **kwargs)
--> 250 response.raise_for_status()
251 return response
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/requests/models.py in raise_for_status(self)
942 if http_error_msg:
--> 943 raise HTTPError(http_error_msg, response=self)
944
HTTPError: 404 Client Error: Not Found for url: https://coscine.rwth-aachen.de/coscine/api/Coscine.Api.Metadata/Metadata/profiles/https%3A%2F%2Fpurl.org%2Fcoscine%2Fap%2Fsfb1394%2FCalphadDB%2F/abb54be4-9e91-4242-98aa-5f1c883c0f9c
During handling of the above exception, another exception occurred:
ClientError Traceback (most recent call last)
<ipython-input-18-61d359f93c35> in <module>
----> 1 some_res.MetadataForm()
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/resource.py in MetadataForm(self, data)
372 """
373
--> 374 return MetadataForm(self, data)
375
376 ###############################################################################
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/metadata.py in __init__(self, resource, data)
49 vocabulary = {}
50 lang = resource.client.lang
---> 51 profile = resource.application_profile(parse = True)
52 for element in profile["graph"]:
53 flags = MetadataForm.NONE
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/resource.py in application_profile(self, parse)
304 """
305
--> 306 return self.client.static.application_profile(\
307 self.profile, self.id, parse)
308
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/static.py in application_profile(self, path, id, parse)
348 profile = self.cache[uri]
349 else:
--> 350 profile = self.client.get(uri).json()
351 self.cache[uri] = profile
352
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/client.py in get(self, uri, **kwargs)
291 """
292
--> 293 return self._request("GET", uri, **kwargs)
294
295 ###############################################################################
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/client.py in _request(self, method, uri, **kwargs)
256 raise AuthorizationError("Invalid API token!")
257 else:
--> 258 raise ClientError()
259
260 ###############################################################################
ClientError: