Describe the bug
Re-uploading a curated CAS (JSONCAS or XMI) via the REST API or pycaprio fails. CasDoctor rejects the CAS due to missing CASMetadata and span validation errors. Normal single-annotator CAS uploads work fine; the issue occurs only with curated CAS.
To Reproduce
Steps to reproduce the behavior:
1 - Export the curated CAS via REST or UI in jsoncas or xmi format.
2- Attempt to re-upload the curated CAS using pycaprio:
curated_bytes = client.api.curation(project_id, doc_id, curation_format="jsoncas")
client.api.create_curation(
project_id,
doc_id,
curation_format="jsoncas",
content=("curation.json", BytesIO(curated_bytes))
)
Expected behavior
The curated CAS should be uploadable without errors.
Error message
When ulpoading json cas:
"Internal server error: CasDoctor found 3 issues:\nCAS contains no CASMetadata. Cannot check concurrent access.\nType [de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData] has [1] unreachable instances\n[custom.Span] [Lactifreir\u2026ipessoal ]@[12933-12982] ends with whitespace\n"
When uploading xmi:
"Internal server error: CasDoctor found 2 issues:\nCAS contains no CASMetadata. Cannot check concurrent access.\n[custom.Span] [Alandroal\". ]@[10940-10952] ends with whitespace\n"
Please complete the following information:
- Version: 39.4 (2026-01-20 13:55:09, build 99066443)
- OS: Linux
Additional Context:
I tried the API directly on the Swagger documentation, and got the same errors
Describe the bug
Re-uploading a curated CAS (JSONCAS or XMI) via the REST API or pycaprio fails. CasDoctor rejects the CAS due to missing CASMetadata and span validation errors. Normal single-annotator CAS uploads work fine; the issue occurs only with curated CAS.
To Reproduce
Steps to reproduce the behavior:
1 - Export the curated CAS via REST or UI in jsoncas or xmi format.
2- Attempt to re-upload the curated CAS using pycaprio:
Expected behavior
The curated CAS should be uploadable without errors.
Error message
When ulpoading json cas:
"Internal server error: CasDoctor found 3 issues:\nCAS contains no CASMetadata. Cannot check concurrent access.\nType [de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData] has [1] unreachable instances\n[custom.Span] [Lactifreir\u2026ipessoal ]@[12933-12982] ends with whitespace\n"
When uploading xmi:
"Internal server error: CasDoctor found 2 issues:\nCAS contains no CASMetadata. Cannot check concurrent access.\n[custom.Span] [Alandroal\". ]@[10940-10952] ends with whitespace\n"
Please complete the following information:
Additional Context:
I tried the API directly on the Swagger documentation, and got the same errors