Skip to content
New issue

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

Getting pyparsing.ParseException while reading .V21 file #178

Open
chopinx opened this issue Apr 3, 2019 · 4 comments
Open

Getting pyparsing.ParseException while reading .V21 file #178

chopinx opened this issue Apr 3, 2019 · 4 comments

Comments

@chopinx
Copy link

chopinx commented Apr 3, 2019

Hi,

I am reading CWR file through this Data-api library. I am getting the following exception. I can send the file case by email if necessary.

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2018.2.2\helpers\pydev\pydevd.py", line 1664, in
main()
File "C:\Program Files\JetBrains\PyCharm 2018.2.2\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm 2018.2.2\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2018.2.2\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/python_project/wrc_parser/main.py", line 28, in
data = decoder.decode(data)
File "D:\python_project\wrc_parser\venv\lib\site-packages\cwr\parser\decoder\file.py", line 308, in decode
transmission = self._file_decoder.decode(data['contents'])[0]
File "D:\python_project\wrc_parser\venv\lib\site-packages\cwr\parser\decoder\common.py", line 90, in decode
return self._grammar.parseString(text)
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1632, in parseString
raise exc
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3398, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3381, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3381, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3381, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3398, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3548, in parseImpl
raise maxException
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3533, in parseImpl
ret = e._parse( instring, loc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 3398, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "D:\python_project\wrc_parser\venv\lib\site-packages\pyparsing.py", line 2797, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected {group_trailer_base | group_trailer_short} (at char 322593), (line:2203, col:1)

@chopinx
Copy link
Author

chopinx commented Apr 3, 2019

the case in tests/example folder can be correctly parsed, but my case failed.

@Bernardo-MG
Copy link
Collaborator

Thanks for sharing, but the project is not being developed currently.

@chopinx
Copy link
Author

chopinx commented Apr 5, 2019

This project is very well designed. But It is difficult for me to understand all the details in a short time. I would like to ask some question if you like.

  1. Is there any limit on transaction num in one group?
  2. Under what conditions GRT is exoected?

@EricOuma
Copy link

EricOuma commented Jul 9, 2021

@chopinx did you get a solution for the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants