Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken since python3.8 upgrade #146

Open
lgarcin opened this issue Nov 7, 2019 · 3 comments
Open

Broken since python3.8 upgrade #146

lgarcin opened this issue Nov 7, 2019 · 3 comments

Comments

@lgarcin
Copy link

lgarcin commented Nov 7, 2019

The pweave executable seems to be broken since I upgraded to python3.8 (everything was fine with python 3.7).

When I try an example of the docs

pweave -f md2html FIR_designp.pmd

I get the following error message

Traceback (most recent call last):
  File "c:\users\laure\appdata\local\programs\python\python38\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 "c:\users\laure\appdata\local\programs\python\python38\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 "c:\users\laure\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\laure\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\laure\AppData\Local\Programs\Python\Python38\Scripts\pweave.exe\__main__.py", line 7, in <module>
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\pweave\scripts.py", line 53, in weave
    pweave.weave(infile, **opts_dict)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\pweave\__init__.py", line 59, in weave
    doc.weave()
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\pweave\pweb.py", line 192, in weave
    self.run()
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\pweave\pweb.py", line 122, in run
    proc = Processor(copy.deepcopy(self.parsed),
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\pweave\processors\jupyter.py", line 169, in __init__
    super(IPythonProcessor, self).__init__(*args, embed_kernel=embed)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\pweave\processors\jupyter.py", line 34, in __init__
    km.start_kernel(cwd=path, stderr=open(os.devnull, 'w'))
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\inprocess\manager.py", line 46, in start_kernel
    self.kernel = InProcessKernel(parent=self, session=self.session)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 72, in __init__
    super(InProcessKernel, self).__init__(**traits)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\ipkernel.py", line 71, in __init__
    self.shell.displayhook.pub_socket = self.iopub_socket
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\traitlets\traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\traitlets\traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 67, in _default_iopub_socket
    return self.iopub_thread.background_socket
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\traitlets\traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\traitlets\traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 59, in _default_iopub_thread
    thread = IOPubThread(self._underlying_iopub_socket)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\iostream.py", line 71, in __init__
    self._setup_event_pipe()
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\iostream.py", line 90, in _setup_event_pipe
    self._event_puller = ZMQStream(pipe_in, self.io_loop)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\zmq\eventloop\zmqstream.py", line 127, in __init__
    self._init_io_state()
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\zmq\eventloop\zmqstream.py", line 546, in _init_io_state
    self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\tornado\platform\asyncio.py", line 99, in add_handler
    self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
  File "c:\users\laure\appdata\local\programs\python\python38\lib\asyncio\events.py", line 501, in add_reader
    raise NotImplementedError
NotImplementedError
@lgarcin
Copy link
Author

lgarcin commented Nov 7, 2019

Answering to myself.

This seems to be related to this issue

@adbull
Copy link

adbull commented May 22, 2021

This was fixed for me by upgrading to python3.9.

@sergiomora03
Copy link

@lgarcin you're right. It solved by update notebook package in python:

pip install notebook --upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants