Okapi OpenXML filter for OmegaT can't load Excel file embedding HTML tags

66 views
Skip to first unread message

Manuel Souto Pico

unread,
Jan 29, 2021, 1:43:10 PM1/29/21
to okapi-users
Dear all, 

I have an OmegaT project with an Excel file containing some HTML content and I have tried to use the Okapi OpenXML filter to open it.

When I enable the Okapi OpenXML filter and reload the project, I get an error and the project is closed. If I try to open it again, I get the same error again and the project closes again. In other words, the project is now unusable. The only way I can fix it is to disable the Okapi OpenXML filter in the filters.xml file.

This is the error OmegaT gives me before the project is closed: 

image.png

This is the error from the log: 

17318: Info: Omtv= 4.2.0 flag2_5=true flag3_plus=true
17318: Info: Loading: 'C:\Users\Valentina\Downloads\Prometric_JLFW_Test3\source\20NOV01_Aliasing_Delivery_Clean_English.xlsx' with okf_openxml
17318: Error: Failed to load specified project! (TF_LOAD_ERROR)
17318: Error: java.io.IOException: C:/Users/Valentina/Downloads/Prometric_JLFW_Test3/source/20NOV01_Aliasing_Delivery_Clean_English.xlsx
17318: Error: java.lang.ClassCastException: com.sun.xml.internal.stream.events.CharacterEvent cannot be cast to javax.xml.stream.events.EndElement
17318: Error: at org.omegat.filters2.master.FilterMaster.loadFile(FilterMaster.java:206)
17318: Error: at org.omegat.core.data.RealProject.loadSourceFiles(RealProject.java:1150)
17318: Error: at org.omegat.core.data.RealProject.loadProject(RealProject.java:369)
17318: Error: at org.omegat.core.data.ProjectFactory.loadProject(ProjectFactory.java:72)
17318: Error: at org.omegat.gui.main.ProjectUICommands$6.lambda$doInBackground$0(ProjectUICommands.java:523)
17318: Error: at org.omegat.core.Core.executeExclusively(Core.java:379)
17318: Error: at org.omegat.gui.main.ProjectUICommands$6.doInBackground(ProjectUICommands.java:523)
17318: Error: at org.omegat.gui.main.ProjectUICommands$6.doInBackground(ProjectUICommands.java:442)
17318: Error: at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
17318: Error: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
17318: Error: at javax.swing.SwingWorker.run(SwingWorker.java:334)
17318: Error: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
17318: Error: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
17318: Error: at java.lang.Thread.run(Thread.java:748)
17318: Error: Caused by: java.lang.ClassCastException: com.sun.xml.internal.stream.events.CharacterEvent cannot be cast to javax.xml.stream.events.EndElement
17318: Error: at com.sun.xml.internal.stream.events.DummyEvent.asEndElement(DummyEvent.java:122)
17318: Error: at net.sf.okapi.filters.openxml.StringItemParser.processText(StringItemParser.java:128)
17318: Error: at net.sf.okapi.filters.openxml.StringItemParser.parse(StringItemParser.java:78)
17318: Error: at net.sf.okapi.filters.openxml.SharedStringsPart.process(SharedStringsPart.java:113)
17318: Error: at net.sf.okapi.filters.openxml.SharedStringsPart.open(SharedStringsPart.java:91)
17318: Error: at net.sf.okapi.filters.openxml.OpenXMLFilter.nextInDocument(OpenXMLFilter.java:446)
17318: Error: at net.sf.okapi.filters.openxml.OpenXMLFilter.next(OpenXMLFilter.java:256)
17318: Error: at net.sf.okapi.filters.openxml.OpenXMLFilter.next(OpenXMLFilter.java:265)
17318: Error: at net.sf.okapi.lib.omegat.AbstractOkapiFilter.processFile(AbstractOkapiFilter.java:374)
17318: Error: at net.sf.okapi.lib.omegat.AbstractOkapiFilter.parseFile(AbstractOkapiFilter.java:209)
17318: Error: at net.sf.okapi.lib.omegat.OpenXMLFilter.parseFile(OpenXMLFilter.java:21)
17318: Error: at org.omegat.filters2.master.FilterMaster.loadFile(FilterMaster.java:204)
17318: Error: ... 13 more
17318: Info: Project loading end (LOG_DATAENGINE_LOAD_END)

You can download the sample OmegaT project containing a sample file from https://mega.nz/file/aFl0CQCK#NJyLnkDJ85jom7TB6KXSsvP7pDV_tx587N62ROkcdcM

I am using:
  • OmegaT 4.2.0
  • okapiFiltersForOmegaT-1.8-1.40.0-dist.zip
  • Windows 10
Shall I create a ticket to report the bug?

Thanks.
Cheers, Manuel


Manuel Souto Pico

unread,
Feb 4, 2021, 1:40:44 PM2/4/21
to okapi-users
Dear all, 


Let me know if any questions. 
Cheers, Manuel

Manuel Souto Pico <termin...@gmail.com> escreveu no dia sexta, 29/01/2021 à(s) 19:42:
Dear all, 

I have an OmegaT project with an Excel file containing some HTML content and I have tried to use the Okapi OpenXML filter to open it.

When I enable the Okapi OpenXML filter and reload the project, I get an error and the project is closed. If I try to open it again, I get the same error again and the project closes again. In other words, the project is now unusable. The only way I can fix it is to disable the Okapi OpenXML filter in the filters.xml file.

This is the error OmegaT gives me before the project is closed: 


This is the error from the log: 

17318: Info: Omtv= 4.2.0 flag2_5=true flag3_plus=true
17318: Info: Loading: 'C:\Users\Valentina\Downloads\JLFW_Test3\source\br.xlsx' with okf_openxml
17318: Error: Failed to load specified project! (TF_LOAD_ERROR)
17318: Error: java.io.IOException: C:/Users/Valentina/Downloads/JLFW_Test3/source/br.xlsx
Reply all
Reply to author
Forward
0 new messages