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

Error in parsing filename if no model id exists on windows #295

Open
davidhoksza opened this issue Nov 11, 2019 · 5 comments
Open

Error in parsing filename if no model id exists on windows #295

davidhoksza opened this issue Nov 11, 2019 · 5 comments
Assignees
Labels

Comments

@davidhoksza
Copy link

I tried to upload the attached valid SBML file with cy3sbml in Cytoscape 3.7.2. and got the following parsing error

  Task (org.cy3sbml.SBMLReaderTask@698f9f49) title: cy3sbml reader
  Task (org.cy3sbml.SBMLReaderTask@698f9f49) progress: 0%
  CyNetwork w/ public tables created: ID = 110
  CyNetwork w/ public tables created: Base Graph ID = 126
  Task (org.cy3sbml.SBMLReaderTask@698f9f49) progress: 40%
  Exception executing task: cy3sbml reader failed to build a SBML model. Please validate the file in the online SBML validator at 'http://www.sbml.org/validator/'and report the issue at 'https://github.com/matthiaskoenig/cy3sbml/issues'java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \

F100-aspirin-V003B-SBGNv02.sbgn.sbml.txt

@matthiaskoenig
Copy link
Owner

@davidhoksza I just tried the file and loads without issues.

Could you check this with the latest version of cy3sbml in a clean installation.
I.e. delete

  • CytoscapeConfiguration/cy3sbml
  • CytoscapeConfiguration/3/apps/installed/cy3sbml*.jar
  • restart Cytoscape
  • install via app store
  • restart Cytoscape

You should have cy3sbml-v0.3.0

@davidhoksza
Copy link
Author

@matthiaskoenig I am actually on Windows and that might be the problem. Possibly something encoding-related? Anyway, I tried to reinstall both Cytoscape and the plugin (yes, I have 0.3.0) and the issue remains...

@davidhoksza
Copy link
Author

@matthiaskoenig Actually, I am having the same issue with the "Hornberg 2005 (ERK cascade) L2V1
BIOMD0000000084" example which comes with cy3sbml. The other examples work just fine.

@matthiaskoenig
Copy link
Owner

matthiaskoenig commented Nov 11, 2019

Thanks for the bug report. I could reproduce the error on Windows in a virtual machine.
This is a very strange error indeed where there are some problems in parsing the file name if there is no model id.
I will submit a bugfix soon.

For now just give your model a model id then everything should work, i.e., add the id attribute to your model
<model areaUnits="area_unit" ... -> <model id="test" areaUnits="area_unit"
which will fix the problem with the model on win (see file attached).
F100-aspirin-V003B-SBGNv02.sbgn_with_model_id.sbml.txt

The full stack trace is attached below for me to debug.

WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
layout (Layout) is unknown! Some data might be lost.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'x' on t
he element position is not part of the SBML specifications (XMLNode) or has an i
nvalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'y' on t
he element position is not part of the SBML specifications (XMLNode) or has an i
nvalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'z' on t
he element position is not part of the SBML specifications (XMLNode) or has an i
nvalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'height'
 on the element dimensions is not part of the SBML specifications (XMLNode) or h
as an invalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'width'
on the element dimensions is not part of the SBML specifications (XMLNode) or ha
s an invalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'type' o
n the element element is not part of the SBML specifications (XMLNode) or has an
 invalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'type' o
n the element element is not part of the SBML specifications (XMLNode) or has an
 invalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'type' o
n the element element is not part of the SBML specifications (XMLNode) or has an
 invalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'type' o
n the element element is not part of the SBML specifications (XMLNode) or has an
 invalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'x' on t
he element position is not part of the SBML specifications (XMLNode) or has an i
nvalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'y' on t
he element position is not part of the SBML specifications (XMLNode) or has an i
nvalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'z' on t
he element position is not part of the SBML specifications (XMLNode) or has an i
nvalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'height'
 on the element dimensions is not part of the SBML specifications (XMLNode) or h
as an invalid value.
 WARN (AbstractReaderWriter.java:105) - processAttribute: The attribute 'width'
on the element dimensions is not part of the SBML specifications (XMLNode) or ha
s an invalid value.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
model (Model) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
 WARN (XMLNodeReader.java:261) - The type of String 'annotation' on the element
species (Species) is unknown! Some data might be lost.
WARN  (org.cy3sbml.SBMLReaderTask) - Layouts found, but not yet supported.
ERROR (org.cy3sbml.SBMLReaderTask) - Could not read SBML into Cytoscape!
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
 ^
        at java.util.regex.Pattern.error(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.<init>(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.lang.String.split(Unknown Source)
        at java.lang.String.split(Unknown Source)
        at org.cy3sbml.SBMLReaderTask.getNetworkName(SBMLReaderTask.java:544)
        at org.cy3sbml.SBMLReaderTask.addAllNetworks(SBMLReaderTask.java:438)
        at org.cy3sbml.SBMLReaderTask.createNetworksFromModel(SBMLReaderTask.jav
a:393)
        at org.cy3sbml.SBMLReaderTask.run(SBMLReaderTask.java:293)
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.inne
rRun(JDialogTaskManager.java:337)
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(
JDialogTaskManager.java:352)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
 ^
        at java.util.regex.Pattern.error(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.<init>(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.lang.String.split(Unknown Source)
        at java.lang.String.split(Unknown Source)
        at org.cy3sbml.SBMLReaderTask.getNetworkName(SBMLReaderTask.java:544)
        at org.cy3sbml.SBMLReaderTask.addAllNetworks(SBMLReaderTask.java:438)
        at org.cy3sbml.SBMLReaderTask.createNetworksFromModel(SBMLReaderTask.jav
a:393)
        at org.cy3sbml.SBMLReaderTask.run(SBMLReaderTask.java:293)
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.inne
rRun(JDialogTaskManager.java:337)
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(
JDialogTaskManager.java:352)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
org.cy3sbml.SBMLReaderError: cy3sbml reader failed to build a SBML model. Please
 validate the file in the online SBML validator at 'http://www.sbml.org/validato
r/'and report the issue at 'https://github.com/matthiaskoenig/cy3sbml/issues'jav
a.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
 ^
        at org.cy3sbml.SBMLReaderTask.run(SBMLReaderTask.java:365) ~[?:?]
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.inne
rRun(JDialogTaskManager.java:337) ~[87:org.cytoscape.work-swing-impl:3.7.2]
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(
JDialogTaskManager.java:352) [87:org.cytoscape.work-swing-impl:3.7.2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [
?:?]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:
?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?
:?]
        at java.lang.Thread.run(Unknown Source) [?:?]
org.cy3sbml.SBMLReaderError: cy3sbml reader failed to build a SBML model. Please
 validate the file in the online SBML validator at 'http://www.sbml.org/validato
r/'and report the issue at 'https://github.com/matthiaskoenig/cy3sbml/issues'jav
a.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
 ^
        at org.cy3sbml.SBMLReaderTask.run(SBMLReaderTask.java:365)
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.inne
rRun(JDialogTaskManager.java:337)
        at org.cytoscape.work.internal.task.JDialogTaskManager$TaskRunnable.run(
JDialogTaskManager.java:352)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

@matthiaskoenig matthiaskoenig changed the title "java.util.regex.PatternSyntaxException: Unexpected internal error near index 1" on a valid SBML file Error in parsing filename if no model id exists on windows Nov 11, 2019
@matthiaskoenig matthiaskoenig self-assigned this Nov 11, 2019
@davidhoksza
Copy link
Author

Great. Thanks for looking into the problem so fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants