question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pyparsing.ParseException: Expected end of text

See original GitHub issue

The newest version of a cantools (4.0.0) crashes while parsing dbc on string: BA_ “BusType” “CAN”;

Error log:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/cantools/db.py", line 547, in add_dbc
    tokens = self._grammar.parseString(dbc.read())
  File "/usr/local/lib/python3.5/dist-packages/pyparsing.py", line 1632, in parseString
    raise exc
  File "/usr/local/lib/python3.5/dist-packages/pyparsing.py", line 1622, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/usr/local/lib/python3.5/dist-packages/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.5/dist-packages/pyparsing.py", line 3395, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/usr/local/lib/python3.5/dist-packages/pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.5/dist-packages/pyparsing.py", line 3183, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected end of text (at char 10209), (line:218, col:1)

File fragment:

BA_DEF_DEF_  "BusType" "CAN";
BA_ "BusType" "CAN";
BA_ "GenMsgCycleTime" BO_ 13 1;

Old, 1.0.0, works as expected.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
slovak194commented, Dec 10, 2017

Sorry, I was not able to answer your questions. In the nearest future, I’ll possibly again work with your amazing library and give you more feedback. Best regards, Alex

0reactions
eerimoqcommented, Jul 16, 2017

Closing since no response was received, and that usually means it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ParseException: Expected end of text - python - Stack Overflow
I am trying to parse text using pyparsing.
Read more >
bind 9.6 - pyparsing.ParseException: Expected end of text ...
I used my (new Vim syntax highlighter)[https://github.com/egberts/vim-syntax-bind-named] on your named.conf to catch a few 'errors' I don't know ...
Read more >
pyparsing module — PyParsing 3.0.10 documentation
pyparsing module - Classes and methods to define and execute parsing ... ParseException: Expected end of text, found 'b' (at char 5), (line:1,...
Read more >
ESP-IDF pyparsing expecting end of text - espressif32
Hi guys, I have a ESP project with following settings: platformio.ini [env:esp32dev] platform = espressif32 board = esp32dev framework ...
Read more >
Python pyparsing.ParseException() Examples
This page shows Python examples of pyparsing. ... Python pyparsing. ... line): """Verifies if a line from a text file is in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found