The following code produces an error:
keyword = "*" + Word(alphas)
# These describe the way data is put into CSV lines
# The single value
dataElement = OneOrMore(Word(alphas + nums + "-" + "."))
# A given line of several dataElements
dataLine = OneOrMore(dataElement + Suppress(",")) + dataElement
#inputField = keyword + OneOrMore(dataLine)
inputField = keyword + OneOrMore(Group(oneOf(dataLine)))
File "c:\python26\lib\site-packages\pyparsing-1.5.6-py2.6-win32.egg\pyparsing.py", line 3256, in oneOf
while i < len(symbols)-1:
UnboundLocalError: local variable 'symbols' referenced before assignment
There are a whole bunch of if ... elif statements just above in which symbols is supposed to be created for the first time. Something must be getting skipped.
Log in to post a comment.