Comments (9)
from pweave.
Same error here ChannelABC() takes no arguments
with
- Windows 10
- python 3.7.5
- jupyter-client 6.0.0
No problem with jupyter-client 5.3.4
from pweave.
Same. I think the way kernels are instantiated must have changed. Here's the issue's exit point from pweave:
Pweave/pweave/processors/jupyter.py
Line 35 in fa2a7f2
My guess is a difference in the jupyter_client.KernelManager.
https://github.com/jupyter/jupyter_client/blob/fa0c78b97bc7183e1a6c0fa2f88fee943e52580e/jupyter_client/manager.py#L32
Looking at the diffs to jupyter_client.manager I'm a bit stumped - https://github.com/jupyter/jupyter_client/compare/0f13a70c920123237c804c68a7bb2f469da2ad0c..9f7c213
from pweave.
What I can say is that if you specify a kernel directly, it works. But you cannot do this from command line for pypublish 😢
from pweave.
A temporary fix seems to be to downgrade
Native Python / Linux:
sudo apt install python3-pip python3-setuptools
python3 -m pip install --upgrade jupyter_client==5.3.1
Anaconda, probably something like this (haven't tried):
conda install notebook==5.3.1
conda install jupyter_client==5.3.1
Apparently not the first time this happend for Jupyter:
jupyter/notebook#4937
from pweave.
Everything seems to go back to normal with the release of jupyter-client 6.1.0.
Environment : Windows10, python 3.7.5, jupyter-client 6.1.0
from pweave.
Interesting. I will try to test locally ... But the CI job looks like it may have some other issues basically in need of a lot of maintenance since the last release.
from pweave.
I am still seeing the error on Mac OSX, python 3.7.6, jupyter-client 6.1.0
from pweave.
I upgraded from Python 3.7.5 to Python 3.8.2 and now I see a new error.
c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\pweave\__init__.py:51: SyntaxWarning: "is not" w
ith a literal. Did you mean "!="?
assert file != "" is not None, "No input specified"
Traceback (most recent call last):
File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\traitlets\traitlets.py", line 528, in ge
t
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 ge
t
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 193, 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 86, 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 63, 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 7
2, 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 __in
it__
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 ge
t
value = self._validate(obj, dynamic_default())
File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 6
7, 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 ge
t
value = self._validate(obj, dynamic_default())
File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 5
9, 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 __in
it__
self._setup_event_pipe()
File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\ipykernel\iostream.py", line 90, in _set
up_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, i
n __init__
self._init_io_state()
File "c:\users\laure\appdata\local\programs\python\python38\lib\site-packages\zmq\eventloop\zmqstream.py", line 546, i
n _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 100,
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
I applied the fix described here.
jupyter/notebook#4613 (comment)
I copied these lines at the beginning of __init__.py
in the pweave package.
import asyncio, sys
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
Everything now works as expected.
from pweave.
Related Issues (20)
- Remove `Published using Pweave` Notice HOT 1
- File Failed to Load MathJax HOT 1
- Broken since python3.8 upgrade HOT 3
- pweave using `results='tex'` in chunk headers creates empty lines in the tex file
- Feature request: include code from chunks with 'source' option in ptangle output
- chunk option `f_spines` documented but does not seem to be implemented
- Is there anyway to change the table format as in fig width
- `<%= %>` and `<% %>` have the same functionality
- figformat removes in >0.3?
- md to pdf using pweave HOT 1
- Any changes to handling of tikz diagrams?
- figure numbers in pandoc
- Is the project still active? HOT 6
- publish can easily support markdown format
- Can chunk option values be expressions?
- customizing fonts, code font size/syntax coloring, document color, etc.
- Not compatible with jupyter-client >= 7.0.0 HOT 6
- Syntax warning from __init__.py: assert file != "" is not None
- WeaveTest.testFIR_FilterExampleTex failing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pweave.