FileNotFoundError during Coscine 0.7.0 client instantiation but not 0.5.5
Hi, first of all, thanks for the conda package of the Coscine SDK! I recently updated to Coscine 0.7.0 using conda and was not able to run the example code of the tutorial which I reproduce below in a snippet:
import coscine
with open("token.txt", "rt") as f:
token = f.read().strip()
client = coscine.Client(token)
I get the following error with Coscine 0.7.0:
Traceback (most recent call last):
File "/home/cpauvert/projects/coscine/test-connexion-coscine/coscine0.7.py", line 6, in <module>
client = coscine.Client(token)
File "/home/cpauvert/mambaforge/envs/coscine/lib/python3.10/site-packages/coscine/client.py", line 163, in __init__
self.vocabularies = VocabularyManager(self)
File "/home/cpauvert/mambaforge/envs/coscine/lib/python3.10/site-packages/coscine/vocabulary.py", line 215, in __init__
pkgutil.get_data(__name__, "data/project.json").decode("utf-8")
File "/home/cpauvert/mambaforge/envs/coscine/lib/python3.10/pkgutil.py", line 639, in get_data
return loader.get_data(resource_name)
File "<frozen importlib._bootstrap_external>", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/home/cpauvert/mambaforge/envs/coscine/lib/python3.10/site-packages/coscine/data/project.json'
I checked that the token is still valid and this code snippet works without any issue when I downgrade to 0.5.5.
I also had a look at the project.json
file in GitLab but it seems that this looked more like a file retrieved from coscine than a file required to connect to it.
Let me know if I can help or test anything,
Best,
Charlie