fredboudon / lpy

An open source python version of the Lindenmayer Systems.
Other
14 stars 13 forks source link

Conflict with lpystudio, jupyter <6 and Python 3.8 #14

Open rbarillot opened 4 years ago

rbarillot commented 4 years ago

I can't open lpystudio under Python 3.8. The issue seems to be related to an incompatibility with jupyter-client. Below the error log:

from openalea.lpy.gui.lpystudio import main
main()
Traceback (most recent call last):
  File "~\envs\py38\lib\site-packages\traitlets\traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'iopub_socket'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~\envs\py38\lib\site-packages\traitlets\traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'iopub_thread'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "\py38\lib\site-packages\openalea.lpy-3.4.0-py3.8.egg\openalea\lpy\gui\lpystudio.py", line 1095, in main
    w = LPyWindow()
  File "\envs\py38\lib\site-packages\openalea.lpy-3.4.0-py3.8.egg\openalea\lpy\gui\lpystudio.py", line 106, in __init__
    lpydock.initDocks(self)
  File "\envs\py38\lib\site-packages\openalea.lpy-3.4.0-py3.8.egg\openalea\lpy\gui\lpydock.py", line 84, in initDocks
    set_shell_widget(lpywidget)
  File "\envs\py38\lib\site-packages\openalea.lpy-3.4.0-py3.8.egg\openalea\lpy\gui\lpyshell.py", line 41, in set_shell_widget
    ipython_widget = LpyShellWidget(lpywidget.interpreterDock)
  File "\envs\py38\lib\site-packages\openalea.lpy-3.4.0-py3.8.egg\openalea\lpy\gui\lpyshell.py", line 24, in __init__
    self.kernel_manager.start_kernel(show_banner=False)
  File "\envs\py38\lib\site-packages\ipykernel\inprocess\manager.py", line 46, in start_kernel
    self.kernel = InProcessKernel(parent=self, session=self.session)
  File "\envs\py38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 72, in __init__
    super(InProcessKernel, self).__init__(**traits)
  File "\envs\py38\lib\site-packages\ipykernel\ipkernel.py", line 71, in __init__
    self.shell.displayhook.pub_socket = self.iopub_socket
  File "\envs\py38\lib\site-packages\traitlets\traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "\envs\py38\lib\site-packages\traitlets\traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "\envs\py38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 67, in _default_iopub_socket
    return self.iopub_thread.background_socket
  File "\envs\py38\lib\site-packages\traitlets\traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "\envs\py38\lib\site-packages\traitlets\traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "\envs\py38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 59, in _default_iopub_thread
    thread = IOPubThread(self._underlying_iopub_socket)
  File "\envs\py38\lib\site-packages\ipykernel\iostream.py", line 71, in __init__
    self._setup_event_pipe()
  File "\envs\py38\lib\site-packages\ipykernel\iostream.py", line 90, in _setup_event_pipe
    self._event_puller = ZMQStream(pipe_in, self.io_loop)
  File "\envs\py38\lib\site-packages\zmq\eventloop\zmqstream.py", line 127, in __init__
    self._init_io_state()
  File "\envs\py38\lib\site-packages\zmq\eventloop\zmqstream.py", line 552, in _init_io_state
    self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ)
  File "\envs\py38\lib\site-packages\tornado\platform\asyncio.py", line 100, in add_handler
    self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
  File "\envs\py38\lib\asyncio\events.py", line 501, in add_reader
    raise NotImplementedError
NotImplementedError

I'm running openalea.plantgl and openalea.lpy from @fredboudon sources under Win 10.

(py38) C:\>conda list
# packages in environment at C:\Users\rbarillot\AppData\Local\Continuum\anaconda2\envs\py38:
#
# Name                    Version                   Build  Channel
ann                       1.1.3                h6538335_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.1                      py_0    conda-forge
boost                     1.72.0           py38h96a391d_0    conda-forge
boost-cpp                 1.72.0               h89d28cc_2    conda-forge
bzip2                     1.0.8                he774522_3    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
certifi                   2020.6.20        py38h32f6830_0    conda-forge
cgal-cpp                  5.0.3                h9a563aa_0    conda-forge
colorama                  0.4.3                      py_0    conda-forge
decorator                 4.4.2                      py_0    conda-forge
eigen                     3.3.7             he980bc4_1001    conda-forge
entrypoints               0.3             py38h32f6830_1001    conda-forge
icu                       67.1                 h33f27b4_0    conda-forge
intel-openmp              2020.2                      254
ipykernel                 5.3.4            py38h5ca1d4c_0    conda-forge
ipython                   7.18.1           py38h1cdfbd6_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.17.2           py38h32f6830_0    conda-forge
jpeg                      9d                   he774522_0    conda-forge
jupyter_client            5.3.4                    py38_1    conda-forge
jupyter_core              4.6.3            py38h32f6830_1    conda-forge
libblas                   3.8.0                    16_mkl    conda-forge
libcblas                  3.8.0                    16_mkl    conda-forge
libclang                  10.0.1          default_hf44288c_1    conda-forge
liblapack                 3.8.0                    16_mkl    conda-forge
libpng                    1.6.37               ha81a0f5_2    conda-forge
libqglviewer              2.6.4                         3    fredboudon
libsodium                 1.0.17               h2fa13f4_0    conda-forge
lz4-c                     1.9.2                h62dcd97_2    conda-forge
mkl                       2020.1                      216
mpfr                      4.0.2                h62dcd97_1    conda-forge
mpir                      3.0.0             he025d50_1002    conda-forge
numpy                     1.19.1           py38h72c728b_0    conda-forge
openalea-lpy              3.4.0                    pypi_0    pypi
openalea-plantgl          3.4.1                    pypi_0    pypi
openalea.lpy              3.4.0            py38h74a9793_1    fredboudon
openalea.plantgl          3.4.1            py38hff33a65_1    fredboudon
openssl                   1.1.1g               he774522_1    conda-forge
parso                     0.7.1              pyh9f0ad1d_0    conda-forge
pickleshare               0.7.5           py38h32f6830_1001    conda-forge
pip                       20.2.2                     py_0    conda-forge
prompt-toolkit            3.0.6                      py_0    conda-forge
pygments                  2.6.1                      py_0    conda-forge
pyopengl                  3.1.5                      py_0    conda-forge
pyqglviewer               1.1.0            py38h74a9793_2    fredboudon
pyqt                      5.12.3           py38h6538335_1    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
python                    3.8.5           h60c2a47_7_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pywin32                   227              py38hfa6e2cd_0    conda-forge
pyzmq                     19.0.2           py38h77b9d75_0    conda-forge
qhull                     2019.1               h7266db4_0    conda-forge
qt                        5.12.6               hb2cf2c5_0    conda-forge
qtconsole                 4.7.6              pyh9f0ad1d_0    conda-forge
qtpy                      1.9.0                      py_0    conda-forge
setuptools                50.0.0           py38h32f6830_0    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
sqlite                    3.33.0               he774522_0    conda-forge
tornado                   6.0.4            py38hfa6e2cd_0    conda-forge
traitlets                 4.3.3            py38h32f6830_1    conda-forge
vc                        14.1                 h869be7e_1    conda-forge
vs2015_runtime            14.16.27012          h30e32a0_2    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_1    conda-forge
wheel                     0.35.1             pyh9f0ad1d_0    conda-forge
wincertstore              0.2                   py38_1003    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.2                ha925a31_3    conda-forge
zlib                      1.2.11            h62dcd97_1009    conda-forge
zstd                      1.4.5                h1f3a1b7_2    conda-forge
jvail commented 4 years ago

Seems to be a known issue with qtconsole py3.8 and win 10:

https://github.com/jupyter/qtconsole/issues/405 https://github.com/jupyter/qtconsole/pull/406 https://github.com/ipython/ipykernel/pull/456

Not sure if updating qtconsole/ipykernel might help...