Bug #2892

Import wrong 'noname' empty columns in metadata.ods

Added by Serge Heiden over 2 years ago. Updated almost 2 years ago.

Status:New Start date:09/10/2020
Priority:High Due date:
Assignee:- % Done:

80%

Category:Import Spent time: -
Target version:TXM 0.8.2

Description

Console output :

-- IMPORTER - Reading source files
Warning: the 8the column name is empty
Warning: the 9the column name is empty

...

-- INJECTING METADATA - [txmid, textorder, date, title, terms, pages, noname, noname] in texts of directory /home/sheiden/TXM-0.8.1/corpora/HOBBES-10-0/txm/HOBBES-10-0
004 ....
Sorting texts using the 'textorder' metadata values: [A86417:3, A43978:2, A43998:4, A43995:1]
-- COMPILING - Building Search Engine indexes
-- Scanning structures&properties to create for 4 texts...
004 .Error while processing A43995 (file: /home/sheiden/TXM-0.8.1/corpora/HOBBES-10-0/txm/HOBBES-10-0/A43995.xml) text XML-TXM file : null. Error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[135,140]
Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNotUnique?text&noname
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[135,140]
Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNotUnique?text&noname
    at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:604)
    at org.txm.importer.SAttributesListener.scanFile(SAttributesListener.java:221)
    at org.txm.importer.SAttributesListener$scanFile.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at org.txm.scripts.importer.xtz.XTZCompiler.doScanStep(XTZCompiler.groovy:120)
    at org.txm.scripts.importer.xtz.XTZCompiler._process(XTZCompiler.groovy:91)
    at org.txm.importer.xtz.Compiler.process(Compiler.java:66)
    at org.txm.importer.xtz.ImportModule$1.run(ImportModule.java:211)
Error while importing corpus during 'compiler' step, reason=not set.

See sample file attached.

Solution

The metadata build step creates the "noname" properties when a column name is empty.

The solution is to skip the column and display a warning message.

metadata.ods (11.4 kB) Serge Heiden, 09/10/2020 03:26 pm

Associated revisions

Revision 3131
Added by Matthieu Decorde almost 2 years ago

fix the "noname" empty metadata values refs #2892

History

#1 Updated by Serge Heiden over 2 years ago

#2 Updated by Matthieu Decorde almost 2 years ago

  • Description updated (diff)
  • % Done changed from 0 to 80

#3 Updated by Serge Heiden almost 2 years ago

  • Description updated (diff)

Also available in: Atom PDF