-
Notifications
You must be signed in to change notification settings - Fork 806
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
Config option template_path
not recognized by LenvsLatexExporter
. Did you mean one of: template_file, template_name, template_paths
?
#1529
Comments
I forgot to mention that even after disabling and/or uninstalling, the warnings continue to show. |
I have the exactly same problem. While looking for possible causes, I found one thing:
|
One more thing to add, that exports from menu |
I have the same issue. After several days to working the annoying problem, deleting and reinstalling, they wont go away. I found this thread when I wanted to open a new issue, so thanks guys for the work around. |
Edit: it looks like @stefansimik already said this I just figured this out. It has to do with the fact that nbconvert 6.0 changed This fixed it for me. |
I am not sure, where change should happen / what project should be updated...
|
I had the same error and downgrading nbconvert to 5.6.1 helped prevent these errors when running jupyter notebook. I have searched around for a while now and still no success. Any ideas/help? Thanks! UPDATE: the table of contents does show up for a different notebook. |
Just in my case - I can say, that TOC extension (https://github.com/jupyterlab/jupyterlab-toc) was working correctly all the time, i.e. even before downgrading nbconvert back to v5.6.1 |
Yes, this issue is related to the change in Nbconvert that replaced 'template_path' with 'template_paths'. Replacing all instances of 'template_path' with 'template_paths' in the extensions jupyter_latex_envs and jupyter_contrib_nbextensions fixes the error. I opened pull requests with these changes: If you want to get rid of the error messages before the extensions update, install the extensions from my repos (or clone them) or just replace 'template_path' with 'template_paths' in the local folders of these extensions (in my case these extensions were in ~/miniconda3/lib/python3.8/site-packages/...) |
How can I do the replace?? |
If you want to manually replace all instances of 'template_path' in the files, you can use an editor such as Visual Studio Code or PyCharm. For example, in VS Code:
|
I have encountered the same problem. Has anyone solved it now? |
Hopefully this pull request can be merged soon - I do have the same problem. |
Hello, I did not solve my problem according to your operation. Is there any other way? |
I solved this problem.First, run pip uninstall nbconvert in Anaconda prompt, and then run conda install "nbconvert = 5.6.1" to solve this problem perfectly! |
@outsider-duwen you've downgraded your local version of nbconvert back to 5.6.1. If I understood it correct a fix is waiting to be deployed: |
I don't think this is the only solution. I hope you can solve it perfectly. After this bug is fixed, I will try other methods. |
Current status of this issue - 2020-10-26 We are waiting for changes in CI configuration:
|
So how to solve this issue? |
|
Yep, or |
Because I wasn't using the pip uninstall jupyter-latex-envs
Found existing installation: jupyter-latex-envs 1.4.6
Uninstalling jupyter-latex-envs-1.4.6:
Would remove:
/home/ryoung/anaconda3/lib/python3.7/site-packages/jupyter_latex_envs-1.4.6.dist-info/*
/home/ryoung/anaconda3/lib/python3.7/site-packages/latex_envs/*
Proceed (y/n)? y
Successfully uninstalled jupyter-latex-envs-1.4.6 |
I found the easiest solution for now was to run: jupyter notebook --log-level=40 which suppresses warnings, for good or ill. |
Yes, the command itself can run successfully, but with many negative effects:
|
Yes, I saw that. I work on it within an env and test for now how things work in practice. I will post updates when I experience some particular troubles. Thanks! |
In my case the packages that got downgraded after I downgraded
So not a big deal I guess, but how long do we still have to wait for this to get properly fixed? UPDATE: I talked too soon! Apparently downgrading nbconvert didn't fix it completely! I'm still seeing the following errors:
The only difference is I'm just seeing a single occurrence of that and not multiple errors as OP reported. (Note for myself: I encountered this problem while trying to install Disco Diffusion) |
@illtellyoulater |
There is a new release that should solve the problems on PyPi. Unfortunately, the maintainer of the conda-forge packages is no longer active. We are trying to fix this, so the update will be available through conda, too. |
in my case, installing "nbconvert<6" gives 500 error when I try to open a notebook -- now I am back to v. nbconvert-7.2.9 |
Exactly, I have to confirm the same problem. Exporting as HTML_TOC is simply still not working as one piece of functional software. |
It seems like the problem persists in nbconvert==7.2.9 and jupyter-notebook==6.5.2. |
Excellently summed and explained 👍 |
So it looks like you have got a stale config file for nbconvert. This will show you the used configuration file and the configuration. Either edit it to remove the offending stuff or delete it. |
Hi juhasch, thank you for your quick reply.
|
This configuration adds support for the notebook extensions to nbconvert. If you don't need it, simply remove the config file, or at least all entries that contain |
Even after deleting jupyter_nbconvert_config.json file, the problem persists. |
I landed here after encountering a bunch of
my jupyter environment versions:
My objective is to run jupyter notebook with nbextensions, TOC2 in particular. I encountered a bunch of weird version incompatibilities leading to 500 server errors or the table of contents showing up blank. As of the versions shown above, my TOC2 setup appears to be working, even though I get 20+ lines of #!/usr/bin/env bash
DRY_RUN=0 # change to 1 to just print the changes
SITE_PACKAGES_DIR=$(python -c 'import site; print(site.getsitepackages()[0])')
patch-template-paths-with-backup() {
_target_relpath=$1
_target_file=$SITE_PACKAGES_DIR/$_target_relpath
_backup_file=$_target_file.orig
if [ -e $_backup_file ]; then
echo "WARN: $_backup_file exists; assuming patch is already completed"
return
fi
SED_STRING='s/\btemplate_path\b/template_paths/g'
if [ $DRY_RUN -eq 1 ]; then
cat $_target_file |
sed $SED_STRING |
diff -Naur $_target_file -
read
else
set -x
mv $_target_file $_backup_file
set +x
cat $_backup_file |
sed $SED_STRING |
cat > $_target_file
fi
}
FILES_TO_CONVERT=(
jupyter_contrib_nbextensions/config_scripts/highlight_html_cfg.py
jupyter_contrib_nbextensions/config_scripts/highlight_latex_cfg.py
jupyter_contrib_nbextensions/install.py
jupyter_contrib_nbextensions/nbconvert_support/exporter_inliner.py
jupyter_contrib_nbextensions/nbconvert_support/toc2.py
jupyter_contrib_nbextensions/nbextensions/runtools/readme.md
jupyter_core/tests/dotipython_empty/profile_default/ipython_nbconvert_config.py
latex_envs/latex_envs.py
);
for file_to_convert in ${FILES_TO_CONVERT[@]}; do
echo $file_to_convert
patch-template-paths-with-backup $file_to_convert
done save this to a bash script in the venv and run it. Restart the server, and the |
Notice the date ......... This problem still exists |
Has anyone found a workaround for this issue? |
No, it is still a problem 🙏 |
Im having this for years. |
I don't see the problem in Jupyter delivered with anaconda (in a virtual environment specially created to check this). Somehow, ananconda has solved the problem and their solution is implicit in anaconda package version numbers. In particuler, nbconvert is 6.5.4. |
@palbarede
|
Today, I met the same questions. |
upgrade nbconvert to 7.6.0 version solves my problem. |
|
Modifying
The cleanest solution seems therefore to only modify Footnotes
|
You may want to replace some |
Several warning messages like the present are shown whenever I open any notebook from jupyter.
I have disabled jupyter_contrib_nbextensions and then uninstalled them.
In all cases, warnings are shown, like in:
[W 18:49:22.283 NotebookApp] Config option
template_path
not recognized byLenvsHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.293 NotebookApp] Config option
template_path
not recognized byLenvsHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.314 NotebookApp] Config option
template_path
not recognized byLenvsTocHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.324 NotebookApp] Config option
template_path
not recognized byLenvsTocHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.366 NotebookApp] Config option
template_path
not recognized byLenvsLatexExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.371 NotebookApp] Config option
template_path
not recognized byLenvsLatexExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.555 NotebookApp] Config option
template_path
not recognized byLenvsSlidesExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.562 NotebookApp] Config option
template_path
not recognized byLenvsSlidesExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.663 NotebookApp] Config option
template_path
not recognized byLenvsHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.673 NotebookApp] Config option
template_path
not recognized byLenvsHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.694 NotebookApp] Config option
template_path
not recognized byLenvsTocHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.704 NotebookApp] Config option
template_path
not recognized byLenvsTocHTMLExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.746 NotebookApp] Config option
template_path
not recognized byLenvsLatexExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.752 NotebookApp] Config option
template_path
not recognized byLenvsLatexExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.911 NotebookApp] Config option
template_path
not recognized byLenvsSlidesExporter
. Did you mean one of:template_file, template_name, template_paths
?[W 18:49:22.917 NotebookApp] Config option
template_path
not recognized byLenvsSlidesExporter
. Did you mean one of:template_file, template_name, template_paths
?The text was updated successfully, but these errors were encountered: