reloadware / reloadium

Hot Reloading and Profiling for Python
https://reloadium.io
Apache License 2.0
2.74k stars 56 forks source link

Error when exit() in interact shell #186

Closed hubporter closed 3 months ago

hubporter commented 3 months ago

Describe the bug*

Error when exit() in interact shell

To Reproduce

Steps to reproduce the behavior:

  1. Include code.interact(local=locals()) in script
  2. Run script and jump into interact shell
  3. Type exit()
  4. See error Reloadium experienced a fatal error and has to quit.

Expected behavior

No error.

Screenshots

Traceback (most recent call last): File "D:\Apps\python-3.11.8.amd64\Lib\site-packages\reloadium\corium\ll111ll1ll11ll1lIl1l1.py", line 200, in ll111l111l111ll1Il1l1 File "D:\a\reloadware\reloadware\reload\package__obfuscated\reloadium\fast\lll11ll1ll1111l1Il1l1\l1l1llll11lll11lIl1l1.py", line 679, in ll1l1l1l111llll1Il1l1 File "", line 241, in _call_with_frames_removed File "D:\Workspace**.py", line 454, in code.interact(banner=None, readfunc=None, local=locals(), exitmsg=None) File "D:\Apps\python-3.11.8.amd64\Lib\code.py", line 301, in interact console.interact(banner, exitmsg) File "D:\Apps\python-3.11.8.amd64\Lib\code.py", line 232, in interact more = self.push(line) ^^^^^^^^^^^^^^^ File "D:\Apps\python-3.11.8.amd64\Lib\code.py", line 258, in push more = self.runsource(source, self.filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Apps\python-3.11.8.amd64\Lib\code.py", line 74, in runsource self.runcode(code) File "D:\Apps\python-3.11.8.amd64\Lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in File "", line 26, in call__ SystemExit: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Apps\python-3.11.8.amd64\Lib\site-packages\reloadium\corium\ll111ll1ll11ll1lIl1l1.py", line 189, in ll11l11lll1ll111Il1l1 File "D:\a\reloadware\reloadware\reload\package__obfuscated\reloadium\fast\l1l11ll11ll11l11Il1l1.py", line 75, in exec_module File "D:\a\reloadware\reloadware\reload\package__obfuscated\reloadium\fast\lll11ll1ll1111l1Il1l1\l1l1llll11lll11lIl1l1.py", line 677, in ll1l1l1l111llll1Il1l1 File "D:\Apps\python-3.11.8.amd64\Lib\contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "D:\Apps\python-3.11.8.amd64\Lib\site-packages\reloadium\corium\ll111ll1ll11ll1lIl1l1.py", line 202, in ll111l111l111ll1Il1l1 TypeError: 'NoneType' object cannot be interpreted as an integer (8.9801) Critical reloader Error {'traceback': 'Traceback (most recent call last):\n' " File '.../reloadium\corium\ll111ll1ll11ll1lIl1l1.py', line " '200, in ll111l111l111ll1Il1l1\n' ' File ' "'D:\a\reloadware\reloadware\reload\package\obfuscated\reloadium\fast\lll11ll1ll1111l1Il1l1\l1l1llll11lll11lIl1l1.py', " 'line 679, in ll1l1l1l111llll1Il1l1\n' " File '', line 241, in " '_call_with_frames_removed\n' " File '\**.py', line 454, in \n" ' code.interact(banner=None, readfunc=None, local=locals(), ' 'exitmsg=None)\n' " File 'D:\Apps\python-3.11.8.amd64\Lib\code.py', line 301, " 'in interact\n' ' console.interact(banner, exitmsg)\n' " File 'D:\Apps\python-3.11.8.amd64\Lib\code.py', line 232, " 'in interact\n' ' more = self.push(line)\n' ' ^^^^^^^^^^^^^^^\n' " File 'D:\Apps\python-3.11.8.amd64\Lib\code.py', line 258, " 'in push\n' ' more = self.runsource(source, self.filename)\n' ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n' " File 'D:\Apps\python-3.11.8.amd64\Lib\code.py', line 74, " 'in runsource\n' ' self.runcode(code)\n' " File 'D:\Apps\python-3.11.8.amd64\Lib\code.py', line 90, " 'in runcode\n' ' exec(code, self.locals)\n' " File '', line 1, in \n" " File '', line 26, in call\n" 'SystemExit: None\n' '\n' 'During handling of the above exception, another exception ' 'occurred:\n' '\n' 'Traceback (most recent call last):\n' " File '.../reloadium\corium\ll111ll1ll11ll1lIl1l1.py', line " '189, in ll11l11lll1ll111Il1l1\n' ' File ' "'D:\a\reloadware\reloadware\reload\package\obfuscated__\reloadium\fast\l1l11ll11ll11l11Il1l1.py', " 'line 75, in exec_module\n' ' File ' "'D:\a\reloadware\reloadware\reload\package\obfuscated\reloadium\fast\lll11ll1ll1111l1Il1l1\l1l1llll11lll11lIl1l1.py', " 'line 677, in ll1l1l1l111llll1Il1l1\n' " File 'D:\Apps\python-3.11.8.amd64\Lib\contextlib.py', " 'line 158, in exit__\n' ' self.gen.throw(typ, value, traceback)\n' " File '.../reloadium\corium\ll111ll1ll11ll1lIl1l1.py', line " '202, in ll111l111l111ll1Il1l1\n' "TypeError: 'NoneType' object cannot be interpreted as an " 'integer\n'}

Desktop or remote (please complete the following information):**

Python 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)] on win32

Additional context

n/a

hubporter commented 3 months ago

Cannot reproduce after restart pc.