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.

Name conflict in load grammar

See original GitHub issue
>>> import lark
...
  File "C:\Users\bjorn\AppData\Local\Programs\Python\Python36\lib\site- 

packages\lark\load_grammar.py", line 5, in <module> from ast import literal_eval ImportError: cannot import name ‘literal_eval’

The problem is that there is already an ast module in the current directory. A relative import should be used here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bjournecommented, Apr 27, 2019

Oh. I see.

1reaction
drunkwcodescommented, Apr 12, 2019

Renaming your local ast.py should be fine. https://docs.python.org/3/library/ast.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I seeing the Name Conflict dialog box in Excel?
If you are seeing the Name Conflict dialog box in Excel, that's because you are trying to copy one or more worksheets to...
Read more >
Grammar conflict with same prefix - parsing - Stack Overflow
it has the same prefix FOR , and I'd want to print the for_begin label after InitExpression , however the codes right after...
Read more >
How do I resolve shift/reduce conflict? - Lezer - CodeMirror
I have this error: > lezer-generator src/glimmer.grammar -o src/parser && rollup -c shift/reduce conflict between Invocation -> SubExpStart ...
Read more >
Fix conflicting records errors - Google Domains Help
Record already in use; Name conflict; Invalid record count. Before you begin. Certain records don't interact well with each other and may cause...
Read more >
How can I deal with "Eigennamen" when they conflict with the ...
is correct. In written language, people should understand you're referring to the street name "Alte Straße" and not to an old street, as...
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