Coscine Python SDK issueshttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues2022-10-29T06:29:28+02:00https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/1Missing parentheses2022-10-29T06:29:28+02:00Niklas SiemerMissing parenthesesFist of all, thank you very much for the API! Reading the documentation, I recognized a few missing parentheses here:
> ### Delete a resource
>
> ```python
> CoscineClient.deleteresourceresource)
> ```
>
> ### Download a resource
>
>...Fist of all, thank you very much for the API! Reading the documentation, I recognized a few missing parentheses here:
> ### Delete a resource
>
> ```python
> CoscineClient.deleteresourceresource)
> ```
>
> ### Download a resource
>
> ```python
> CoscineClient.download_resourceresource, path="./")
> ```
>
> ### Get the Application Profile used in a resource
>
> ```python
> CoscineClient.get_application_profileresource, parse=False)https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/2Feature Request: loading filled meta data form from a file2022-10-29T06:29:23+02:00Niklas SiemerFeature Request: loading filled meta data form from a fileTo work with existing meta data of a specific file, I would like to receive the filled meta data from of a file. I wrote some function to get such a form, however, this feels very fragile and might not cover every scenario:
```python
def...To work with existing meta data of a specific file, I would like to receive the filled meta data from of a file. I wrote some function to get such a form, however, this feels very fragile and might not cover every scenario:
```python
def form_with_metadata_from_file(pr, res, filename):
meta_data_of_file = client.get_metadata(res, filename)
actual_meta_data = [val for val in meta_data_of_file['data']['metadataStorage'][0].values()][0]
profile_of_res = client.get_application_profile(res, parse=True)
form = client.MetadataForm(pr, res)
for key in profile_of_res['graph']:
try:
field_val = actual_meta_data[key['path']][0]['value']
field_type = actual_meta_data[key['path']][0]['type']
except KeyError:
field_val = None
field_name = key['name']['en']
if field_val is not None and field_type != 'uri':
form[field_name] = field_val
return form
```https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/3Upload of data fails if not in verbose mode2022-10-29T06:29:20+02:00Niklas SiemerUpload of data fails if not in verbose modeI just tried to upload data to CoScInE using the API in the non-verbose mode and encountered a
```
NameError: free variable 'bar' referenced before assignment in enclosing scope
```
the variable `bar` is only populated in the verbose mo...I just tried to upload data to CoScInE using the API in the non-verbose mode and encountered a
```
NameError: free variable 'bar' referenced before assignment in enclosing scope
```
the variable `bar` is only populated in the verbose mode, however, used in all cases in the `lambda` function causing the error:
https://git.rwth-aachen.de/coscine/docs/public/coscine-python-client/-/blob/master/src/coscine/coscine.py#L588-592
For now, I just use `client.verbose= True; client.upload... ; client.verbose=False` as a workaround.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/4Problems with new type settings of version 52022-10-29T06:29:16+02:00Niklas SiemerProblems with new type settings of version 5In the new version 5, there are some very nice features coming as far as I can tell.
However, importing the new Client results in an error:
```
---------------------------------------------------------------------------
TypeError ...In the new version 5, there are some very nice features coming as far as I can tell.
However, importing the new Client results in an error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-d5185e459cbe> in <module>
----> 1 from coscine import Client
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/__init__.py in <module>
12 ###############################################################################
13
---> 14 from .client import Client
15 from .project import Project
16 from .resource import Resource
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/client.py in <module>
27 from .about import __version__
28 from .exceptions import *
---> 29 from .project import Project
30 from .static import StaticServer
31 from .ProjectForm import ProjectForm
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/project.py in <module>
20 import json
21 from .exceptions import *
---> 22 from .resource import Resource
23 from .ResourceForm import ResourceForm
24 from .ProjectForm import ProjectForm
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/resource.py in <module>
22 from .exceptions import *
23 from .object import Object
---> 24 from .MetadataForm import MetadataForm
25 from .MetadataPresetForm import MetadataPresetForm
26 from .ResourceForm import ResourceForm
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/MetadataForm.py in <module>
13
14 from .exceptions import *
---> 15 from .form import Form
16
17 ###############################################################################
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/form.py in <module>
17 ###############################################################################
18
---> 19 class Form(MutableMapping):
20
21 # Form flags
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/form.py in Form()
142 ###############################################################################
143
--> 144 def keys(self) -> list[str]:
145 return self._keys.keys()
146
TypeError: 'type' object is not subscriptable
```
As far as I can tell, there are some new definitions of output types causing the problem. While it is intended to have a 'list of strings' as output type here, python tries to subscript the type `list` with the type `str`.
I found such definitions e.g. in
- `project.py` lines 44, 45, 84, 126,
- `resource.py` line 102
- `client.py` lines 53, 109https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/5Feature Request: Nice formatting of the MetaDataForm2021-10-11T22:43:12+02:00Niklas SiemerFeature Request: Nice formatting of the MetaDataFormIn the previous version, a `MetaDataForm` was nicely represented like
```
============
[] key
[R] key2 = somthing
============
R=Required, C=Controlled
```
or the like.
Is there a particular reason this nice representation was not adde...In the previous version, a `MetaDataForm` was nicely represented like
```
============
[] key
[R] key2 = somthing
============
R=Required, C=Controlled
```
or the like.
Is there a particular reason this nice representation was not added to the new version? If not, I would like to get that back. Thanks for having a look!https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/6Problem with `Resource.upload`2021-10-13T19:37:40+02:00Niklas SiemerProblem with `Resource.upload`First of all, I really like the new client, since it provides the same hierarchy as found on CoScInE! Thanks a lot!
However, I have some problems to upload files via the python client right now.
I tried the following code
```
from cosc...First of all, I really like the new client, since it provides the same hierarchy as found on CoScInE! Thanks a lot!
However, I have some problems to upload files via the python client right now.
I tried the following code
```
from coscine import Client
with open('../CoScInE_token2.txt') as f:
token = f.read()
c = Client(token=token, verbose=False)
prs = c.projects()
pr = prs[1]
print(f"Project: ID={pr.data['id']} slug={pr.data['slug']}")
res = pr.resources()[2]
mtdf = res.MetadataForm()
mtdf['ID'] = '1'
mtdf["User"] = 'Me'
print(f"Resource: ID={res.data['id']}")
c.verbose = True
res.upload(key='some_key', file='../Documents/empty.txt', metadata=mtdf)
```
and got this output:
```
Project: ID=e1983a56-ee35-413e-9a66-771196c0a089 slug=testproject-9522
Resource: ID=abb54be4-9e91-4242-98aa-5f1c883c0f9c
[REQUEST] PUT https://coscine.rwth-aachen.de/coscine/api/Coscine.Api.Tree/Tree/abb54be4-9e91-4242-98aa-5f1c883c0f9c/some_key
[DATA] {
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
{
"type": "uri",
"value": "https://purl.org/coscine/ap/sfb1394/CalphadDB/"
}
],
"http://purl.org/dc/terms/identifier": [
{
"value": "1",
"datatype": "http://www.w3.org/2001/XMLSchema#string",
"type": "literal"
}
],
"http://purl.org/dc/terms/creator": [
{
"value": "Me",
"datatype": "http://www.w3.org/2001/XMLSchema#string",
"type": "literal"
}
]
}
Traceback (most recent call last):
File "C:\Users\Siemer\anaconda3\envs\pyinstaller\lib\site-packages\coscine\client.py", line 153, in _request
response.raise_for_status()
File "C:\Users\Siemer\anaconda3\envs\pyinstaller\lib\site-packages\requests\models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://coscine.rwth-aachen.de/coscine/api/Coscine.Api.Tree/Tree/abb54be4-9e91-4242-98aa-5f1c883c0f9c/some_key
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Siemer/Downloads/CoScInE_API-Copy1.py", line 17, in <module>
res.upload(key='some_key', file='../Documents/empty.txt', metadata=mtdf)
File "C:\Users\Siemer\anaconda3\envs\pyinstaller\lib\site-packages\coscine\resource.py", line 67, in upload
self.client.put(uri, data = metadata)
File "C:\Users\Siemer\anaconda3\envs\pyinstaller\lib\site-packages\coscine\client.py", line 176, in put
return self._request("PUT", uri, **kwargs)
File "C:\Users\Siemer\anaconda3\envs\pyinstaller\lib\site-packages\coscine\client.py", line 166, in _request
raise RequestException()
requests.exceptions.RequestException
Process finished with exit code 1
```
I am not sure if I made a mistake somewhere or if this is a real issue. Thanks for looking into this!https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/7Objects without metadata (e.g. S3 resources) lead to mixed up metadata to fil...2021-11-29T21:05:57+01:00Constantin SanderObjects without metadata (e.g. S3 resources) lead to mixed up metadata to file mappingHi, thank you for your Python client.
However, when using S3 resources with files for which no metadata has been (yet) created, the metadata array of the REST api is missing this entry and the Python client mixes up the metadata for an ...Hi, thank you for your Python client.
However, when using S3 resources with files for which no metadata has been (yet) created, the metadata array of the REST api is missing this entry and the Python client mixes up the metadata for an object when zipping metadata and files (https://git.rwth-aachen.de/coscine/docs/public/coscine-python-client/-/blob/679fc1047bc076e1af26fc704b0cacd6c7826c46/src/coscine/resource.py#L107).
It can also happen that the S3 object cannot be selected (e.g., to update its metadata) as the zip results in an empty / too small list.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/8Updating metadata of an object fails2021-11-29T21:05:53+01:00Constantin SanderUpdating metadata of an object failsUpdating metadata of an object fails as `MetadataForm` is not imported when not type checking.
(https://git.rwth-aachen.de/coscine/docs/public/coscine-python-client/-/blob/679fc1047bc076e1af26fc704b0cacd6c7826c46/src/coscine/object.py#L89)Updating metadata of an object fails as `MetadataForm` is not imported when not type checking.
(https://git.rwth-aachen.de/coscine/docs/public/coscine-python-client/-/blob/679fc1047bc076e1af26fc704b0cacd6c7826c46/src/coscine/object.py#L89)https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/9`coscine.resource.Resource.quota()` does not work2021-12-09T13:01:52+01:00Niklas Siemer`coscine.resource.Resource.quota()` does not workI think data will be a `dict` and thus we need `data["data"]["usedSizeByte"]` instead.
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call ...I think data will be a `dict` and thus we need `data["data"]["usedSizeByte"]` instead.
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-e7a9fb35fe75> in <module>
----> 1 res.quota()
/mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/resource.py in quota(self)
96 uri = self.client.uri("Blob", "Blob", self.id, "quota")
97 data = self.client.get(uri).json()
---> 98 return int(data("data")["usedSizeByte"])
99
100 ###############################################################################
TypeError: 'dict' object is not callable
```https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/10Feature request: Directly adding members to projects2022-02-09T16:35:55+01:00Niklas SiemerFeature request: Directly adding members to projectsCurrently it is possible to `invite` new members via the e-mail address to a project. On the Web-page (and via the API) it is also possible to directly add new members without invitation/e-mail sending.
I would like to have a function t...Currently it is possible to `invite` new members via the e-mail address to a project. On the Web-page (and via the API) it is also possible to directly add new members without invitation/e-mail sending.
I would like to have a function to do this to keep members between different projects synchronized easily.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/11Meta data forms not accessible!2022-10-29T06:29:04+02:00Niklas SiemerMeta data forms not accessible!I currently cannot access the `MetaDataScheme` for any file!
MWE (Full traceback below):
```python
#SETUP
import coscine
c = coscine.Client(TOKEN)
some_obj = c.projects()[0].resources()[0].objects()[0]
some_res = some_obj.resource
# Via...I currently cannot access the `MetaDataScheme` for any file!
MWE (Full traceback below):
```python
#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:
```https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/12FYI conda-forge package2022-10-29T06:28:26+02:00Niklas SiemerFYI conda-forge packageI usually manage my python packages by conda and I was annoyed to always use pip on top of that (which might cause trouble if updating conda packages in some cases). Thus, I started a PR to get coscine on conda forge:
https://github.com...I usually manage my python packages by conda and I was annoyed to always use pip on top of that (which might cause trouble if updating conda packages in some cases). Thus, I started a PR to get coscine on conda forge:
https://github.com/conda-forge/staged-recipes/pull/18090
If someone of you wants to be added as maintainer there, just comment this in the mentioned PR and I will add you.https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/13Missing size not captured for 'rdss3ude', 'rdsude'2023-11-15T16:24:00+01:00Niklas SiemerMissing size not captured for 'rdss3ude', 'rdsude'I just received the (valid!) error:
```
---------------------------------------------------------------------------
RequirementError Traceback (most recent call last)
<ipython-input-118-3f754bf638cf> in <module>...I just received the (valid!) error:
```
---------------------------------------------------------------------------
RequirementError Traceback (most recent call last)
<ipython-input-118-3f754bf638cf> in <module>
----> 1 res_form.generate()
~/anaconda3/envs/pyiron_git/lib/python3.8/site-packages/coscine/resource.py in generate(self)
600 }
601 elif data["type"]["displayName"] in ("rds", "rds-s3"):
--> 602 raise RequirementError("rds or rds-s3 require a size parameter!")
603 data["resourceTypeOption"] = size
604
RequirementError: rds or rds-s3 require a size parameter!
```
However, the new resource types 'rdss3ude', 'rdsude' most probably also require the size (Not captured here).RominRominhttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/14Coscine Python SDK Update Version 0.6.02022-10-29T06:28:47+02:00RominCoscine Python SDK Update Version 0.6.0# TODO for v0.6
- [x] Re-incorporate rdflib and simplify application profile interaction
- [x] Apply single-sourcing package suggestion
- [x] Add conda install documentation
- [x] Enhance form validation and validate using regex
- [x] Fi...# TODO for v0.6
- [x] Re-incorporate rdflib and simplify application profile interaction
- [x] Apply single-sourcing package suggestion
- [x] Add conda install documentation
- [x] Enhance form validation and validate using regex
- [x] Fix recursive directory path handling
- [x] Add test scripts
- [x] new application profiles' size constraints in metadata form
- [x] Enhance README example
- [x] Write community guide for extending the python module and contribute
- [x] ...2022-03-31https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/15Organizations vocabulary is partially bugged2022-10-29T08:08:53+02:00RominOrganizations vocabulary is partially buggedThe organizations vocabulary is apparently too big to query at once (~60MB). No paging is offered by the Coscine REST API afaik. Handling this vocabulary properly and allowing users to set/edit organizations in the ProjectForm apart from...The organizations vocabulary is apparently too big to query at once (~60MB). No paging is offered by the Coscine REST API afaik. Handling this vocabulary properly and allowing users to set/edit organizations in the ProjectForm apart from the first 100 entries probably needs some more work. Either via filter arguments at the generator stage (and consequently making the field uncontrolled) or by implementing some special if case in set_value() of ProjectForm for the organizations field.
For now editing projects works, but only if not touching the organizations field. Also existing organization metadata might be altered (if an RWTH organization has been set, but it's not found in the vocabulary, it is cut off and converted to RWTH Aachen itself, not the original institute). Therefore caution must be taken when using the ProjectForm at the moment. :shrug:https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/16Handling folders in Coscine2022-11-10T23:53:40+01:00Paul KießlingHandling folders in CoscineI heard that Coscine supports folders in resources.
How can I create a folder or upload a file in a folder?
I tried:
```
filename = "folder1/test.pdf" # filename as it should appear in Coscine
path = "/home/wintermute/Downloads/test.p...I heard that Coscine supports folders in resources.
How can I create a folder or upload a file in a folder?
I tried:
```
filename = "folder1/test.pdf" # filename as it should appear in Coscine
path = "/home/wintermute/Downloads/test.pdf"
resource.upload(filename, path, metadata)
```
But that fails. Any ideas?https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/17Collection of docs/examples/tutorials issues2022-11-15T13:38:00+01:00Nicole ParksCollection of docs/examples/tutorials issuesTo help improve the Coscine Python SDK documentation, I am starting this issue to collect things I notice while reading the docs, tutorials, etc.
Here's the first one:
#### S3 credentials access
- correct: https://git.rwth-aachen.de/c...To help improve the Coscine Python SDK documentation, I am starting this issue to collect things I notice while reading the docs, tutorials, etc.
Here's the first one:
#### S3 credentials access
- correct: https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/blob/master/src/examples/examples.md (resource.s3.access_key_write; resource.s3.secret_key_write)
- incorrect: https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/blob/master/src/examples/tutorial.md (resource.s3.access_key; resource.s3.secret_key)https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/18FileNotFoundError during Coscine 0.7.0 client instantiation but not 0.5.52022-09-05T14:30:30+02:00Charlie PauvertFileNotFoundError during Coscine 0.7.0 client instantiation but not 0.5.5Hi,
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](https://git.rwth-aachen.de/coscine/community-features/coscine-p...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](https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/blob/master/src/examples/tutorial.md#import-and-initialization) which I reproduce below in a snippet:
```python
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:
```bash
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,
Charliehttps://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/20`print(project)` fails for specific cases2022-10-29T06:37:40+02:00Niklas Siemer`print(project)` fails for specific casesFor some reason the `Project.data` of my TestProject reads
```
'displayName': 'TestProject',
'startDate': '2020-09-24T06:46:58.497',
'endDate': '2020-10-31T07:46:00',
```
which results in the following error if a print is attempted:
...For some reason the `Project.data` of my TestProject reads
```
'displayName': 'TestProject',
'startDate': '2020-09-24T06:46:58.497',
'endDate': '2020-10-31T07:46:00',
```
which results in the following error if a print is attempted:
```python
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [17], line 1
----> 1 pr.startDate
File /mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/project.py:187, in Project.startDate(self)
185 @property
186 def startDate(self) -> datetime:
--> 187 return datetime.strptime(self.data["startDate"], TIMEFORMAT)
File ~/anaconda3/envs/pyiron/lib/python3.8/_strptime.py:568, in _strptime_datetime(cls, data_string, format)
565 def _strptime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"):
566 """Return a class cls instance based on the input string and the
567 format string."""
--> 568 tt, fraction, gmtoff_fraction = _strptime(data_string, format)
569 tzname, gmtoff = tt[-2:]
570 args = tt[:6] + (fraction,)
File ~/anaconda3/envs/pyiron/lib/python3.8/_strptime.py:352, in _strptime(data_string, format)
349 raise ValueError("time data %r does not match format %r" %
350 (data_string, format))
351 if len(data_string) != found.end():
--> 352 raise ValueError("unconverted data remains: %s" %
353 data_string[found.end():])
355 iso_year = year = None
356 month = day = 1
ValueError: unconverted data remains: .497
```https://git.rwth-aachen.de/coscine/community-features/coscine-python-sdk/-/issues/21Use `colorama.Fore.RESET` to reset color in banner2022-10-29T06:26:41+02:00Robin Joscha SonnabendUse `colorama.Fore.RESET` to reset color in banner`Logger.banner()` ends with `Colors.WHITE` (aka `colorama.Fore.WHITE`), but there's no guarantee that's properly resetting the console color. The correct way is to use `colorama.Fore.RESET`.`Logger.banner()` ends with `Colors.WHITE` (aka `colorama.Fore.WHITE`), but there's no guarantee that's properly resetting the console color. The correct way is to use `colorama.Fore.RESET`.