Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BioC exported from INCEpTION cannot be imported again due to missing mandatory metadata #4533

Closed
azankl opened this issue Feb 21, 2024 · 1 comment
Assignees
Labels
🐛Bug Something isn't working Module: BioC
Projects
Milestone

Comments

@azankl
Copy link

azankl commented Feb 21, 2024

When trying to upload a file in Bioc-XML format to Inception, I get a 'source file does not exist' error, see screenshot below:

Screenshot 2024-02-21 at 11 02 55 am

From the error message, it seems that Inception is looking for the file in /srv/inception/... while I selected the file from my desktop.
This only happens with BioC-XML files, importing a plain text file from my desktop to Inception works as expected.

Please complete the following information:

  • Version and build ID: - INCEpTION -- 31.0 (2024-02-06 23:22:40, build 8e5dd70)
  • OS: OSX 14.3.1 (Client), Inception running on remote Red Hat server
  • Browser: Safari 17.3.1
@reckart
Copy link
Member

reckart commented Feb 21, 2024

Thanks for the report. You are probably trying to re-import a BioC file exported from INCEpTION back into it. The exporter currently has a bug that the key and date BioC metadata items are not written to the exported file.

Workaround: Until this bug is fixed, you can manually add these elements to your BioC file at the beginning of file. Make sure that both elements actually contains something - they must not be empty:

<collection>
    <key>foo</key>
    <date>2020-10-02</date>
    <source>file:/...</source>
    <document>
...

@reckart reckart added this to the 31.2 milestone Feb 21, 2024
@reckart reckart added 🐛Bug Something isn't working Module: BioC labels Feb 21, 2024
@reckart reckart self-assigned this Feb 21, 2024
@reckart reckart added this to 🔖 To do in Kanban via automation Feb 21, 2024
@reckart reckart changed the title file not found error when importing file in BioC format BioC exported from INCEpTION cannot be imported again due to missing mandatory metadata Feb 21, 2024
reckart added a commit that referenced this issue Feb 21, 2024
…missing mandatory metadata

- Make sure that key, date and source are generated if they are not present in the CAS when writing BioC
- Make reading BioC more robust so that it does not fail if key, date or source are missing
reckart added a commit that referenced this issue Feb 21, 2024
…rted-from-INCEpTION-cannot-be-imported-again-due-to-missing-mandatory-metadata

#4533 - BioC exported from INCEpTION cannot be imported again due to missing mandatory metadata
@reckart reckart closed this as completed Feb 21, 2024
Kanban automation moved this from 🔖 To do to 🍹 Done Feb 21, 2024
reckart added a commit that referenced this issue Feb 21, 2024
* release/31.x:
  #4533 - BioC exported from INCEpTION cannot be imported again due to missing mandatory metadata
reckart added a commit that referenced this issue Feb 25, 2024
* main: (95 commits)
  #4556 - Unable to access PMC BioC service
  #4554 - Allow displaying comments from annotators on hover when curating using curation sidebar on the annotation page
  #4552 - No details shown when hovering over annotations in lower part of the curation page
  #4550 - Clean up code
  #4550 - Clean up code
  #4547 - Cannot create long-distance relation in PDF editor
  #4545 - Upgrade dependencies
  #4545 - Upgrade dependencies
  #4543 - UI for creating new concept or properties has broken layout
  #4541 - Upgrade dependencies
  #4538 - Lazy details and selecting annotations my break after opening a read-only document and not performing actions for a short time
  #4537 - Ability to group annotations by layer
  #4533 - BioC exported from INCEpTION cannot be imported again due to missing mandatory metadata
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-31.1
  #4530 - Keyboard shortcuts for feature values may not work in certain editors
  #4528 - Display key bindings in radio group string feature editor
  #4525 - Support recommendations for non-string primitive features
  #4523 - Factor endpoint-specific FTS code out into adapter classes
  #4523 - Factor endpoint-specific FTS code out into adapter classes
  ...

% Conflicts:
%	inception/inception-dependencies/pom.xml
%	inception/inception-imls-weblicht/pom.xml
%	inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/KnowledgeBaseServiceImpl.java
%	inception/inception-project-export/src/test/resources/log4j2-test.xml
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/PredictionTask.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/SelectionTask.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/TrainingTask.java
%	inception/inception-ui-curation/pom.xml
%	inception/inception-ui-dashboard-activity/pom.xml
%	inception/inception-ui-kb/src/main/java/de/tudarmstadt/ukp/inception/ui/kb/initializers/NamedEntityIdentifierFeatureInitializer.java
%	inception/inception-ui-scheduling/pom.xml
%	inception/inception-ui-scheduling/src/main/java/de/tudarmstadt/ukp/inception/ui/scheduling/TaskMonitorPanel.java
%	pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: BioC
Projects
Kanban
  
🍹 Done
Development

No branches or pull requests

2 participants