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

Pickling Error with 1.8 #5422

Closed
blink1073 opened this issue Sep 13, 2018 · 4 comments
Closed

Pickling Error with 1.8 #5422

blink1073 opened this issue Sep 13, 2018 · 4 comments

Comments

@blink1073
Copy link

blink1073 commented Sep 13, 2018

Subject: Sphinx 1.8 introduced a build error for JupyterLab

Problem

AttributeError: Can't pickle local object 'setup.<locals>.<lambda>'

Changing it to a separate function yields (cf https://travis-ci.org/jupyterlab/jupyterlab/jobs/428072324#L763 and https://github.com/jupyterlab/jupyterlab/pull/5308/files):

_pickle.PicklingError: Can't pickle <function url_resolver at 0x2b0913492e18>: attribute lookup url_resolver on __main__ failed

Procedure to reproduce the problem

git clone https://github.com/jupyterlab/jupyterlab
cd jupyterlab/docs
pip install sphinx=1.8 sphinx_rtd_theme recommonmark
make html

Environment info

  • OS: MacOS 10.13.6
  • Python version: 3.6.3
  • Sphinx version: 1.8.0
@tk0miya
Copy link
Member

tk0miya commented Sep 13, 2018

It seems the error comes from the default setting for recommonmark.AutoStructify.
I'll take a look this later.

Note: I confirmed this with following dockerfile:

FROM tk0miya/sphinx-html

RUN git clone https://github.com/jupyterlab/jupyterlab
WORKDIR /docs/jupyterlab/docs
RUN pip3 install sphinx==1.8 sphinx_rtd_theme recommonmark
RUN make html SPHINXBUILD='python3 -msphinx'

@blink1073
Copy link
Author

Cheers!

tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 14, 2018
tk0miya added a commit that referenced this issue Sep 15, 2018
Fix #5422: lambda object causes PicklingError on storing environment
@tk0miya
Copy link
Member

tk0miya commented Sep 15, 2018

Fixed by #5429 .
Thank you for reporting.

@tk0miya tk0miya closed this as completed Sep 15, 2018
@blink1073
Copy link
Author

🎉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants