GUI: consecutive import of sample from several python scripts is affected by previous imports
|Status:||Backlog||Start date:||11 Jan 2019|
Bug appears on consecutive import of sample from different Python scripts.
Suppose you have script1.py with the method get_sample1(), and script2.py with the method get_sample2().
If you import script1.py to GUI, widget will correctly show existence of get_sample1() function and will successfully import sample from it.
If you when import script2.py, the list of function will show existence of two functions, get_sample1() from first script, and get_sample2() from current script.
Strangely enough, import of both functions is working.
It seems that embedded Python interpreter remembers everything which happened to him during GUI session.Steps to reproduce:
- Use scripts from the attachment, and try to import sample from first and second script one after another.
#4 Updated by dmitry about 1 year ago
- Assignee deleted (
- Target version changed from Sprint 41 to v2.0
The bug is related to creating a python interpreter and not cleaning it up.
Seemingly it is possible to run an independent sub-interpreter (see Py_NewInterpreter in python documentation) on each new task.
However, I did not manage to work it properly and got application crash at consecutive interpreter's creation/usage.