We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi all, thanks a lot for the great package!
There seems to be a bug with missing whitespaces and the power operator **. It can only be parsed if a whitespace is inserted before.
**
formulate.from_numexpr('a**2') raises an error formulate.from_numexpr('a ** 2') works
formulate.from_numexpr('a**2')
formulate.from_numexpr('a ** 2')
Other operators work fine without whitespace.
This is the full error:
In [12]: formulate.from_numexpr('a**2') ERROR:formulate:TODO TRACEBACK: ('a**2', 1, 'Expected end of text') ERROR:formulate:Error parsing: a**2 ERROR:formulate: ▲ ERROR:formulate: ┃ ERROR:formulate: ┗━━━━━━ Error here or shortly after --------------------------------------------------------------------------- ParseException Traceback (most recent call last) ~/anaconda3/envs/rkq37/lib/python3.7/site-packages/formulate/parser.py in to_expression(self, string) 232 try: --> 233 result = self._parser.parseString(string, parseAll=True) 234 assert len(result) == 1, result ~/anaconda3/envs/rkq37/lib/python3.7/site-packages/pyparsing.py in parseString(self, instring, parseAll) 1954 exc.__traceback__ = self._trim_traceback(exc.__traceback__) -> 1955 raise exc 1956 else: ~/anaconda3/envs/rkq37/lib/python3.7/site-packages/pyparsing.py in parseImpl(self, instring, loc, doActions) 3813 if loc < len(instring): -> 3814 raise ParseException(instring, loc, self.errmsg, self) 3815 elif loc == len(instring): ParseException: Expected end of text, found '*' (at char 1), (line:1, col:2) During handling of the above exception, another exception occurred: ParsingException Traceback (most recent call last) <ipython-input-12-c3a50f695328> in <module> ----> 1 formulate.from_numexpr('a**2') ~/anaconda3/envs/rkq37/lib/python3.7/site-packages/formulate/parser.py in to_expression(self, string) 244 exception = ParsingException() 245 exception.__context__ = None --> 246 raise exception 247 else: 248 return result ParsingException:
Any ideas?
The text was updated successfully, but these errors were encountered:
Allow me to ping @chrisburr as this bug is probably an easy fix for an expert.
Sorry, something went wrong.
chrisburr
No branches or pull requests
Hi all, thanks a lot for the great package!
There seems to be a bug with missing whitespaces and the power operator
**
. It can only be parsed if a whitespace is inserted before.formulate.from_numexpr('a**2')
raises an errorformulate.from_numexpr('a ** 2')
worksOther operators work fine without whitespace.
This is the full error:
Any ideas?
The text was updated successfully, but these errors were encountered: