hello - i'm getting an error executing parseString when the following seemingly basic ParseAction is added - when there's no ParseAction set it parses without any issue. Any insight? I'm using the latest pyparsing-1.5.6 and Python 3.2
Series_Code.setParseAction( lambda tokens : "".join(tokens))
test = "Series_Code: Series 1-1|"
topIDs = Suppress("Series_Code:") + Series_Code + Suppress("|")
parsed = (topIDs).parseString(test)
File "C:\Python32\lib\site-packages\pyparsing.py", line 689, in wrapper
UnboundLocalError: local variable 'limit' referenced before assignment
this is the code referenced by the error
def _trim_arity(func, maxargs=2):
limit = maxargs
#~ nonlocal limit
limit -= 1
This code is from the version of pyparsing that is compatible with Python 2.x. Please get one of the Python 3.x compatible installation files, or download the source version and use setup.py - this should install the correct version of pyparsing for you. (You can manually select the pyparsing_py3.py file and just copy it to your site-packages directory also).
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.