You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enter some text on input, e.g. "hi" which will produce the expected output "you entered: hi"
change line 4 in the script to print(f'USER entered: {s}')
enter some text on input, e.g. "hi"
Expected behavior
The code should be reloaded during execution and the output should be "USER entered: hi". Instead, the output is still "you entered: hi". Subsequent inputs produce the same output (i.e. no change is applied). See this log:
/usr/bin/python3.10 -m reloadium run <CENSORED>/reloadiumtest/reloadiumtest.py
■■■■■■■■■■■■■■■
Reloadium 0.9.0
■■■■■■■■■■■■■■■
If you like this project consider becoming a sponsor or giving a star at https://github.com/reloadware/reloadium
>
Loaded 1 watched modules so far from paths:
- <CENSORED>/reloadiumtest/**/*.py
hi
you entered: hi
> Update Module: __main__
hi again
you entered: hi again
Desktop (please complete the following information):
OS: Linux
OS version: Ubuntu 22.04
Reloadium package version: 0.9.0
PyCharm plugin version: 0.8.3
Editor: PyCharm
Run mode: Run
Additional context
Also tried to disable reloadium cache, but problem remains.
The text was updated successfully, but these errors were encountered:
The reason why this is not working is because you are changing code that is already being executed on the call stack.
In order for this to work the call stack frame has to be restarted and that is only possible during debugging.
I'll keep this issue open until I add a warning message or document this behavior better.
Empty Update Module: __main__ message is also quite misleading here.
Describe the bug
Using a simple script that accepts user input via
input()
in a loop, the code changes are not reloaded as would be expected.To Reproduce
print(f'USER entered: {s}')
Expected behavior
The code should be reloaded during execution and the output should be "USER entered: hi". Instead, the output is still "you entered: hi". Subsequent inputs produce the same output (i.e. no change is applied). See this log:
Desktop (please complete the following information):
Additional context
Also tried to disable reloadium cache, but problem remains.
The text was updated successfully, but these errors were encountered: