Would you consider displaying warnings without breaking execution? This is how it works upstream in contrast to errors. I recall this option was implemented in Octave recently. Could you please port it to Python? Maybe other backends are affected as well.
Myabe i could catch warning and not threat them as error
(In reply to Nikita Sirgienko from comment #1) > Myabe i could catch warning and not threat them as error That would be great
I was wondering if there is any progress on this issue. Asking because there is a use case that I have identified that deviates from regular python, IPython, etc. It's about a code that removes columns from a panda dataframe: - In regular python, a warning is displayed (only the first time) and columns are removed. Invoking the same instruction again triggers an error because these columns are present no more. - In Cantor, the warning is treated as an error, so the columns are not removed, and the user needs to run the instruction twice to get it done. After that, invoking the instruction again fails as one would expect. In this context, I think a Python user that is not aware of the issue will not understand what is really going on under the hood. More generally, I would encourage to treat all warning as messages to be displayed in Cantor. I think this would also be more consistent with Jupyter Notebooks (btw, I look forward to trying the import/export functionality between notebooks and cantor from the GSoC!).
I can't say, that I use python often, but according your words the problem more important, that I have thought befor, so I give it more priority.
(In reply to Nikita Sirgienko from comment #4) > I can't say, that I use python often, but according your words the problem > more important, that I have thought befor, so I give it more priority. Thank you very much!
Git commit 4bc20243ad683c0f828e1a605adf75d4ddf331d5 by Nikita Sirgienko. Committed on 05/07/2019 at 22:03. Pushed by sirgienko into branch 'master'. [Python] Show Python warnings not as errors, but as text results FIXED-IN: 19.08 M +6 -0 src/backends/python/pythonexpression.cpp M +1 -0 src/backends/python/pythonexpression.h M +12 -1 src/backends/python/pythonserver.cpp M +3 -1 src/backends/python/pythonserver.h M +2 -0 src/backends/python/pythonservermain.cpp M +12 -3 src/backends/python/pythonsession.cpp M +9 -0 src/backends/python2/testpython2.cpp M +2 -0 src/backends/python2/testpython2.h M +9 -0 src/backends/python3/testpython3.cpp M +2 -0 src/backends/python3/testpython3.h https://commits.kde.org/cantor/4bc20243ad683c0f828e1a605adf75d4ddf331d5
(In reply to Nikita Sirgienko from comment #6) > Git commit 4bc20243ad683c0f828e1a605adf75d4ddf331d5 by Nikita Sirgienko. > Committed on 05/07/2019 at 22:03. > Pushed by sirgienko into branch 'master'. > > [Python] Show Python warnings not as errors, but as text results > FIXED-IN: 19.08 > > M +6 -0 src/backends/python/pythonexpression.cpp > M +1 -0 src/backends/python/pythonexpression.h > M +12 -1 src/backends/python/pythonserver.cpp > M +3 -1 src/backends/python/pythonserver.h > M +2 -0 src/backends/python/pythonservermain.cpp > M +12 -3 src/backends/python/pythonsession.cpp > M +9 -0 src/backends/python2/testpython2.cpp > M +2 -0 src/backends/python2/testpython2.h > M +9 -0 src/backends/python3/testpython3.cpp > M +2 -0 src/backends/python3/testpython3.h > > https://commits.kde.org/cantor/4bc20243ad683c0f828e1a605adf75d4ddf331d5 Perfect!