Hi,
I am reading CWR file through this Data-api library. I am getting the following exception.
File "C:\Python34\lib\site-packages\pyparsing.py", line 2794, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected sd_type (at char 114), (line:2, col:27)
Have tested on Python 2.7, Python 3.4 and Python 3.6. Getting same exception. Any help would be appreciated.
Here's the full stack trace of the program.
D:\python_web_crawler>python cwr-convertor.py
File to JSON test
Please enter the full path to a CWR file (e.g. c:/documents/file.cwr): D:/MusicWorksDB/CW160035UN_DIG.V21
Please enter the full path to the file where the results will be stored: D:/MusicWorksDB
Reading file D:/MusicWorksDB/CW160035UN_DIG.V21
Storing output on D:/MusicWorksDB
Traceback (most recent call last):
File "cwr-convertor.py", line 24, in
data = decoder.decode(data)
File "C:\Python34\lib\site-packages\cwr\parser\decoder\file.py", line 305, in decode
transmission = self._file_decoder.decode(data['contents'])[0]
File "C:\Python34\lib\site-packages\cwr\parser\decoder\common.py", line 90, in decode
return self._grammar.parseString(text)
File "C:\Python34\lib\site-packages\pyparsing.py", line 1632, in parseString
raise exc
File "C:\Python34\lib\site-packages\pyparsing.py", line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3545, in parseImpl
raise maxException
File "C:\Python34\lib\site-packages\pyparsing.py", line 3530, in parseImpl
ret = e._parse( instring, loc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 2794, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected sd_type (at char 114), (line:2, col:27)
Hi,
I am reading CWR file through this Data-api library. I am getting the following exception.
File "C:\Python34\lib\site-packages\pyparsing.py", line 2794, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected sd_type (at char 114), (line:2, col:27)
Have tested on Python 2.7, Python 3.4 and Python 3.6. Getting same exception. Any help would be appreciated.
Here's the full stack trace of the program.
D:\python_web_crawler>python cwr-convertor.py
File to JSON test
Please enter the full path to a CWR file (e.g. c:/documents/file.cwr): D:/MusicWorksDB/CW160035UN_DIG.V21
Please enter the full path to the file where the results will be stored: D:/MusicWorksDB
Reading file D:/MusicWorksDB/CW160035UN_DIG.V21
Storing output on D:/MusicWorksDB
Traceback (most recent call last):
File "cwr-convertor.py", line 24, in
data = decoder.decode(data)
File "C:\Python34\lib\site-packages\cwr\parser\decoder\file.py", line 305, in decode
transmission = self._file_decoder.decode(data['contents'])[0]
File "C:\Python34\lib\site-packages\cwr\parser\decoder\common.py", line 90, in decode
return self._grammar.parseString(text)
File "C:\Python34\lib\site-packages\pyparsing.py", line 1632, in parseString
raise exc
File "C:\Python34\lib\site-packages\pyparsing.py", line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 3545, in parseImpl
raise maxException
File "C:\Python34\lib\site-packages\pyparsing.py", line 3530, in parseImpl
ret = e._parse( instring, loc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Python34\lib\site-packages\pyparsing.py", line 2794, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected sd_type (at char 114), (line:2, col:27)