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

AssertionError in make_module_translation_map #17072

Open
justinc1 opened this issue Mar 28, 2024 · 1 comment
Open

AssertionError in make_module_translation_map #17072

justinc1 opened this issue Mar 28, 2024 · 1 comment
Labels

Comments

@justinc1
Copy link

Crash Report

mypyc asserted on specific directory.

Traceback

mypyc subtasks --show-traceback
Traceback (most recent call last):
  File "/tmp/ttrt/build/setup.py", line 5, in <module>
    ext_modules=mypycify(['subtasks', '--show-traceback'], opt_level="3", debug_level="1"),
  File "mypyc/build.py", line 525, in mypycify
  File "mypyc/build.py", line 435, in mypyc_build
  File "mypyc/build.py", line 243, in generate_c
  File "mypyc/codegen/emitmodule.py", line 425, in compile_modules_to_c
  File "mypyc/codegen/emitmodule.py", line 292, in compile_ir_to_c
  File "mypyc/namegen.py", line 50, in __init__
  File "mypyc/namegen.py", line 106, in make_module_translation_map
AssertionError: ['subtasks', 'subtasks.subtasks']

To Reproduce

cd /tmp/
mkdir ttrt
mkdir subtasks
touch subtasks/subtasks.py
mypyc subtasks  # this works

touch subtasks/__init__.py
mypyc subtasks --show-traceback  # this fails

Your Environment

mypyc -V
mypy 1.9.0 (compiled: yes)

python -V
Python 3.9.18
python is in venv

Linux Mint 21.1 Vera
@justinc1 justinc1 added the crash label Mar 28, 2024
@justinc1
Copy link
Author

I will try mv subtasks/subtasks.py subtasks/subtasks_inner.py, seems to help.

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

No branches or pull requests

1 participant