Bug 356103

Summary: Python 3 backend is not functional
Product: [Applications] cantor Reporter: Antonis G. <gaantonio>
Component: python3-backendAssignee: Alexander Rieder <alexanderrieder>
Status: RESOLVED NOT A BUG    
Severity: major CC: alexander.semke, filipe, simgunz
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: attachment-25810-0.html

Description Antonis G. 2015-11-30 08:52:01 UTC
When evaluating entries, the status bar says "Calculating..." but reults are never returned. New variables don't show up in the Variable Manager.

Reproducible: Always

Steps to Reproduce:
Do something simple as "a = 1"



Cantor version 0.6
Comment 1 Filipe Saraiva 2015-12-10 15:07:08 UTC
Hi Antonis, is this bug happening with master or 15.12 version?
Comment 2 Antonis G. 2015-12-12 21:42:10 UTC
Hello, I think so; I downloaded and installed the cantor 15.11.90 version manually, but "cantor -v" still outputs "cantor 0.6".
Sometimes I get this as result:
{'numpy': , '__package__': None, '__name__': '__main__', 'outputPythonBackend': , '__spec__': None, 'scipy': , 'a': 10, 'sys': , '__builtins__': , 'CatchOutPythonBackend': , '__doc__': None, 'matplotlib': , '__loader__': , 'errorPythonBackend': }
others I get this error message:
The name org.kde.Cantor.Python3-32059 was not provided by any .service files
cantor_python3server seems to be running normally.
Comment 3 Antonis G. 2015-12-18 21:17:50 UTC
So today I upgraded everything to 15.12 and its still not fixed.
Comment 4 Simone Gaiarin 2016-02-29 12:07:00 UTC
Still present in KDE 5.19

System: Manjaro Linux
Comment 5 Alexander Semke 2016-05-26 19:19:48 UTC
Hi Antonis, Hi Simone,

looks like you tried to import numpy and scipy in python3. Did you install those modules for python3 on your system? Can you start python3 in the terminal and do 'import numpy'? Does this work for you?
Comment 6 Simone Gaiarin 2016-05-26 19:29:50 UTC
import numpy and import scipy works fine for me in a python shell run from bash. While I still get the error from within cantor.
Comment 7 Alexander Semke 2016-05-26 19:34:46 UTC
which python version do you use in the terminal?
Comment 8 Simone Gaiarin 2016-05-26 20:21:22 UTC
Created attachment 99207 [details]
attachment-25810-0.html

Python 3.5.1

On Thu, May 26, 2016 at 9:34 PM Alexander Semke via KDE Bugzilla <
bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=356103
>
> --- Comment #7 from Alexander Semke <alexander.semke@web.de> ---
> which python version do you use in the terminal?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 9 Alexander Semke 2016-11-28 21:53:46 UTC
Hi Simone,

I cannot reproduce this problem with the current code. Do you see cantor_python3server running if you start python3-session? Which version of Cantor are you using?

Regards,
Alexander
Comment 10 Simone Gaiarin 2016-11-30 18:17:10 UTC
Seems to work now. Version: 16.08.3

I get some weird output though sometimes, I don't know if it's normal.

Steps:
a = 1 OK
b = 2

{'errorPythonBackend': , '__spec__': None, 'a': 1, '__doc__': None, '__loader__': , 'scipy': , 'matplotlib': , 'CatchOutPythonBackend': , 'outputPythonBackend': , '__builtins__': , '__package__': None, 'numpy': , 'sys': , '__name__': '__main__', 'b': 2}

c = a + b OK
import numpy as np OK
dd = np.array([1,2,3]) OK

Reevaluate b = 2 then it's OK

That output appears only if I do Evaluate Worksheet, while with evaluate entry it's fine.
Comment 11 Alexander Semke 2016-12-01 17:29:14 UTC
This seems to be another bug... I created now another ticket https://bugs.kde.org/show_bug.cgi?id=373150 to track this problem. 

I'm closing this ticket now.