Closed elmundio87 closed 7 years ago
@scottbelden any ideas?
I noticed this as well and have been meaning to make a PR. It can be solved by changing https://github.com/virtuald/pyhcl/blob/master/src/hcl/lexer.py#L222 from:
self.lex = lex.lex(module=self, debug=False, reflags=(re.UNICODE | re.MULTILINE))
to:
self.lex = lex.lex(module=self, debug=False, reflags=(re.UNICODE | re.MULTILINE), errorlog=lex.NullLogger())
I'm not sure if there are any other side effects but I agree that the warnings are annoying.
This started in pyhcl 0.3.0 and is also present in pyhcl 0.3.1. I get a long list of warnings when I run
hcl.loads()
I believe it's related to the implementation of the parser using ply. The source code of ply.lex refers to the error at these points: https://github.com/dabeaz/ply/blob/master/ply/lex.py#L1010-L1012
This is the HCL that I'm loading