Understanding Parsing Error when reading model file into PySD
<p>I am receiving the following error message when I try to read a Vensim model file (.mdl) using Python's PySD package.  </p>

<p>My code is:</p>

<pre><code>import pysd
import os

os.chdir('path/to/model_file')

model = pysd.read_vensim('my_model.mdl')
</code></pre>

<p>The Error I receive is:</p>

<pre><code>Traceback (most recent call last):
  Python Shell, prompt 13, line 1
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pysd/pysd.py", line 53, in read_vensim
    py_model_file = translate_vensim(mdl_file)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pysd/vensim2py.py", line 673, in translate_vensim
    entry.update(get_equation_components(entry['eqn']))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pysd/vensim2py.py", line 251, in get_equation_components
    tree = parser.parse(equation_str)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/parsimonious/grammar.py", line 123, in parse
    return self.default_rule.parse(text, pos=pos)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/parsimonious/expressions.py", line 110, in parse
    node = self.match(text, pos=pos)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/parsimonious/expressions.py", line 127, in match
    raise error
parsimonious.exceptions.ParseError: Rule 'subscriptlist' didn't match at '' (line 1, column 21).
</code></pre>

<p>I have searched for this particular error and I cannot find much information on the failed matching rule for 'subscriptlist'. </p>

<p>I appreciate any insight. Thank you.</p>

<p>If you aren't using subscripts, you may have found a bug in the parser. If so, best course is to create a report in the github <a href="https://github.com/JamesPHoughton/pysd/issues" rel="nofollow">issue tracker</a> for the project. The stack trace you posted says that the error is happening in the first line of the file, and that the error has to do with how the right hand side of the equation is being parsed. You might include the first few lines in your bug report to help me recreate the issue. I'll add a case to our growing <a href="https://github.com/SDXorg/test-models" rel="nofollow">test suite</a> and then we can make sure it isn't a problem going forwards.</p>

python vensim