-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Crash on parsing call statement #56
Comments
I have the same issue. Here is a minimal reproducible example: def bar(first, second):
pass
def foo():
data = {"first": "bar", "second": 1}
return bar(**data) Calling: RUST_BACKTRACE=1 pylyzer 1.py
Start checking: 1.py
thread 'pylyzer' panicked at 'called `Option::unwrap()` on a `None` value', crates/py2erg/convert.rs:1057:40
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: py2erg::convert::ASTConverter::convert_expr::{{closure}}
4: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
5: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
6: py2erg::convert::ASTConverter::convert_expr
7: py2erg::convert::ASTConverter::convert_statement
8: py2erg::convert::ASTConverter::convert_block
9: py2erg::convert::ASTConverter::convert_statement
10: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
11: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
12: py2erg::convert::ASTConverter::convert_program
13: pylyzer::analyze::PythonAnalyzer::analyze
14: pylyzer::analyze::PythonAnalyzer::run
15: pylyzer::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Thread panicked: Any { .. } |
Same here, it doesn't start on empty files and crashes on any other that has some form of code in it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pylyzer 0.0.47
I used this file: https://github.com/python/cpython/blob/3.10/Lib/test/test_grammar.py
L1057: https://github.com/mtshiba/pylyzer/blob/main/crates/py2erg/convert.rs#L1057
The text was updated successfully, but these errors were encountered: