Open
Description
Because Python's standard library pdb
module does import code
:
❯ echo "this file in the Mu installation folder should not be imported" > code.py
❯ python run.py
Traceback (most recent call last):
File "/Users/microbit-carlos/workspace/carlos/mu/run.py", line 2, in <module>
from mu.app import run
File "/Users/microbit-carlos/workspace/carlos/mu/mu/app.py", line 47, in <module>
from .logic import Editor, LOG_FILE, LOG_DIR, ENCODING
File "/Users/microbit-carlos/workspace/carlos/mu/mu/logic.py", line 36, in <module>
from pyflakes.api import check
File "/Users/microbit-carlos/workspace/carlos/mu/.venv-qt6/lib/python3.10/site-packages/pyflakes/api.py", line 10, in <module>
from pyflakes import checker, __version__
File "/Users/microbit-carlos/workspace/carlos/mu/.venv-qt6/lib/python3.10/site-packages/pyflakes/checker.py", line 11, in <module>
import doctest
File "/Users/microbit-carlos/.pyenv/versions/3.10.8/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/doctest.py", line 100, in <module>
import pdb
File "/Users/microbit-carlos/.pyenv/versions/3.10.8/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pdb.py", line 77, in <module>
import code
File "/Users/microbit-carlos/workspace/carlos/mu/code.py", line 1
this file in the Mu installation folder should not be imported
^^^^
SyntaxError: invalid syntax
The bug here is that somehow the CircuitPython mode must be saving the code.py
file in the Mu's cwd instead of the CIRCUITPY
drive.
Crash reports:
- Crash Report crash-reports#514
- Crash Report crash-reports#501
- Crash Report crash-reports#497
- The program crashes just after installation, it don't recognize the feather connected, though CIRCUITPY folder exists crash-reports#489
- Crash Report crash-reports#488
- Crash Report crash-reports#484
- Crash Report crash-reports#478
- Crash Report crash-reports#477
- Crash Report crash-reports#473
- Crash Report crash-reports#472
- Crash Report crash-reports#463
- Crash Report crash-reports#447
- Crash Report crash-reports#376
- Crash Report crash-reports#445
- Crash Report crash-reports#539
- Crash Report crash-reports#543
- Crash Report crash-reports#548
- Crash Report C:\Users\JohnB\AppData\Local\python\mu\Logs\mu.log crash-reports#552
- Crash Report crash-reports#580
- Crash Report crash-reports#586
- Crash Report crash-reports#584
- Crash Report crash-reports#578
- Crash Report crash-reports#598
- Crash Report crash-reports#608
- Crash Report crash-reports#609
- Crash Report - Cant Open Mu at All crash-reports#623
These other crash reports are from having the cope.py
file in other directories, that are likely added to the path as well, like the "Desktop", "Downloads" or other folders:
- Crash Report crash-reports#506
- Crash Report crash-reports#461
- Crash Report crash-reports#454
- Crash Report crash-reports#434
- Crash Report crash-reports#402
- Crash Report crash-reports#396
- Crash Report crash-reports#375
- Crash Report crash-reports#361
- Crash Report crash-reports#585
- Crash Report crash-reports#576
- Crash Report crash-reports#572
- Crash Report crash-reports#606
- Crash Report crash-reports#617
- Crash Report crash-reports#618