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

Not compatible with jupyter-client >= 7.0.0 #165

Open
phlummox opened this issue Mar 11, 2022 · 6 comments
Open

Not compatible with jupyter-client >= 7.0.0 #165

phlummox opened this issue Mar 11, 2022 · 6 comments

Comments

@phlummox
Copy link

This issue arises using the current version of Pweave (Pweave-0.30.3) and Python 3.6.9 on Ubuntu 18.04.6.

To reproduce:

$ python3.6 -m venv env && . ./env/bin/activate
$ echo > test.pmd
$ pweave --format=markdown test.pmd

Expected output

$ pweave --format=markdown test.pmd
status
Weaved test.pmd to test.md
$ cat -n test.md
     1	

Actual output

output follows:
status
Traceback (most recent call last):
  File "/home/user/test/env/bin/pweave", line 11, in <module>
    sys.exit(weave())
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/scripts.py", line 53, in weave
    pweave.weave(infile, **opts_dict)
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/__init__.py", line 59, in weave
    doc.weave()
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/pweb.py", line 192, in weave
    self.run()
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/pweb.py", line 127, in run
    self.wd
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/processors/jupyter.py", line 171, in __init__
    self.init_matplotlib()
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/processors/jupyter.py", line 174, in init_matplotlib
    self.loadstring(subsnippets.init_matplotlib)
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/processors/jupyter.py", line 134, in loadstring
    return self.run_cell(code_str)
  File "/home/user/test/env/lib/python3.6/site-packages/pweave/processors/jupyter.py", line 66, in run_cell
    msg = self.kc.get_shell_msg(timeout=timeout)
AttributeError: 'BlockingInProcessKernelClient' object has no attribute 'get_shell_msg'

Comments

Versions of jupyter-client from 6.1.5 through to 6.1.12 inclusive seem to work fine. (This can be tested by running e.g. pip install --upgrade Pweave 'jupyter-client==6.1.12'.)

Earlier than 6.1.0, I assume one runs into issue #151.

@dequadras
Copy link

I have the same issue on mac, haven't yet been able to figure out which jupyter client to install

@phlummox
Copy link
Author

Well, as I mention in the original issue, versions from 6.1.5 through to 6.1.12 seem to work fine.

But if you can't use those, then I think you may simply be out of luck. Pweave as it stands appears to be incompatible with recent versions of jupyter-client, and activity on the project seems to have ceased (the last activity by maintainers was in 2019).

@dequadras
Copy link

dequadras commented Jul 25, 2022

You are right, I changed to the version you mention and now it works, thanks!

@amichuda
Copy link

In case either of you are interested, a lot of the nice properties from pweave can now be found in quarto, which uses python natively and has support for a lot of nice format (and uses pandoc too).

https://quarto.org/

@phlummox
Copy link
Author

In case either of you are interested, a lot of the nice properties from pweave can now be found in quarto, which uses python natively and has support for a lot of nice format (and uses pandoc too).

https://quarto.org/

Ah, cool! I'll take a look. I actually ended up implementing my own mini- generator and templating engine to replace my use of Pweave, because Pweave contains a lot of features I just never use. But something better maintained than my own hacked together solution would be great. :)

@phlummox
Copy link
Author

phlummox commented Mar 24, 2023

An update, for anyone coming across this issue: Pweave seems to be dead [1] [2], but I listed some alternatives here:

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