Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
how to replicate the issue
Python 3.11.3/3.11.2/3.11.1/3.11.0 (python-3.11.3-amd64.exe etc)
Microsoft Windows [Version 10.0.19044.2130] (Active code page: 936)
tmp.py
#coding:utf-8print("中文")
python -m pdb tmp.py
Traceback (most recent call last): File"C:\Users\xond\AppData\Local\Programs\Python\Python311\Lib\pdb.py", line1774, inmain pdb._run(target) File"C:\Users\xond\AppData\Local\Programs\Python\Python311\Lib\pdb.py", line1652, in_runself.run(target.code)^^^^^^^^^^^ File"C:\Users\xond\AppData\Local\Programs\Python\Python311\Lib\pdb.py", line167, incodereturnf"exec(compile({fp.read()!r},{self!r}, 'exec'))"^^^^^^^^^UnicodeDecodeError:'gbk' codec can't decode byte 0xae in position 28: illegal multibyte sequenceUncaught exception. Entering post mortem debuggingRunning 'cont' or 'step' will restart the program> c:\users\xond\appdata\local\programs\python\python311\lib\pdb.py(167)code()-> return f"exec(compile({fp.read()!r}, {self!r}, 'exec'))"