jupyter / jupyter/notebook

nbconvert failed: validate() got an unexpected keyword argument 'relax_add_props'

Open
#2,901 5 comments 0 reactions 0 assignees View on GitHub
status:Waiting for Author tag:Environment
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

I tried to download the py in pdf format but I have the error "nbconvert failed: validate() got an unexpected keyword argument 'relax_add_props'". And I tried to download it as .py or .tex, none of them works and give back the same error.

```
[E 12:58:14.833 NotebookApp] nbconvert failed: validate() got an unexpected keyword argument 'relax_add_props'
Traceback (most recent call last):
File "/Users/Wanhui/anaconda3/lib/python3.6/site-packages/notebook/nbconvert/handlers.py", line 104, in get
"config_dir": self.application.settings['config_dir'],
File "/Users/Wanhui/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/script.py", line 49, in from_notebook_node
return exporter.from_notebook_node(nb, resources, **kw)
File "/Users/Wanhui/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/templateexporter.py", line 280, in from_notebook_node
nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, **kw)
File "/Users/Wanhui/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 134, in from_notebook_node
nb_copy, resources = self._preprocess(nb_copy, resources)
File "/Users/Wanhui/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 313, in _preprocess
nbformat.validate(nbc, relax_add_props=True)
TypeError: validate() got an unexpected keyword argument 'relax_add_props'

```
How to solve it? I already installed MacTex on my mac.

Contributor guide

Open the contributing guide

Research direction

Start with notebook/nbconvert/handlers.py and nbconvert/exporters/exporter.py, then compare the nbformat.validate call with the installed function signature. Reproduce a .py, .pdf, or .tex export and verify that the exports complete without the unexpected-keyword error.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.