I'm having trouble with PDF conversion. I found on another issue a suggestion so I ran the suggested sudo pip install git+https://github.com/jupyter/nbconvert@master .
file -> download as -> pdf via LATEX
500 : Internal Server Error
The error was:
nbconvert failed: no filter named 'strip_trailing_newline'

Nbconvert version:
i assume so if i download the master via git clone command above
^ I am running into the same issue as @SBFRF after conda installing pandoc and nbconvert.
That is an odd error -- I can't seem to reproduce it and I don't see a way that error could occur from current master code. Can one of you post the minimal notebook that causes this? If it's every notebook we need to look closer at your install environments.
I have a similar issue with the same error message.
nbconvert failed: no filter named 'strip_trailing_newline'

@cyhsu If you could post more details it would help. Library versions, system, conda or virtual env, minimal notebook, etc.
Thanks, this is the detail information.
Conda Information
login3@:~/scratch$ conda info
active environment : keras
active env location : /home/chsu1/.conda/envs/keras
shell level : 1
user config file : /home/chsu1/.condarc
populated config files : /home/chsu1/.condarc
conda version : 4.5.11
conda-build version : 3.10.5
python version : 3.6.5.final.0
base environment : /sw/eb/software/Anaconda3/5.2.0 (read only)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /sw/eb/software/Anaconda3/5.2.0/pkgs
/home/chsu1/.conda/pkgs
envs directories : /home/chsu1/.conda/envs
/sw/eb/software/Anaconda3/5.2.0/envs
platform : linux-64
user-agent : conda/4.5.11 requests/2.18.4 CPython/3.6.5 Linux/2.6.32-754.17.1.el6.x86_64 centos/6.10 glibc/2.12
UID:GID : 15274:15274
netrc file : /home/chsu1/.netrc
offline mode : False
Conda List (Jupyter)
login3@:~/scratch$ conda list -n keras |grep jupyter
jupyter 1.0.0 py_2 conda-forge
jupyter_client 5.3.1 py_0 conda-forge
jupyter_console 6.0.0 py_0 conda-forge
jupyter_core 4.4.0 py_0 conda-forge
jupyterlab 1.0.2 py36_0 conda-forge
jupyterlab_server 1.0.0 py_1 conda-forge
Conda List (nbconvert)
login3@:~/scratch$ conda list -n keras |grep nbconvert
nbconvert 5.6.0 py36_1 conda-forge
OS system
login3@:~/scratch$ uname -a
Linux login3 2.6.32-754.17.1.el6.x86_64 #1 SMP Tue Jul 2 12:42:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Please let me know if you need more information.
On Oct 21, 2019, at 11:10 AM, Matthew Seal notifications@github.com wrote:
@cyhsu https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cyhsu&d=DwMCaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zsSSYjagiVvyJIwbqtDDFQ&m=7s21kJzzEs9i-10CQpO4u3Vibm7pRvOyOR0yZfnAN-I&s=wUIG0WnLJRL7q7CMtG4LiGVOeOaEWFmYHmdM-lADZdY&e= If you could post more details it would help. Library versions, system, conda or virtual env, minimal notebook, etc.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jupyter_nbconvert_issues_1105-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DABITW7IG3I5LEZ5QAV3MQHTQPXIBHA5CNFSM4I4AWTP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB24BTQ-23issuecomment-2D544587982&d=DwMCaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zsSSYjagiVvyJIwbqtDDFQ&m=7s21kJzzEs9i-10CQpO4u3Vibm7pRvOyOR0yZfnAN-I&s=GUd1XWXjp--Mn8D-hEWei0wuEpUgP1sjjA4bb0Uhvkk&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABITW7PMU5VSHTAKXNPLLZ3QPXIBHANCNFSM4I4AWTPQ&d=DwMCaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zsSSYjagiVvyJIwbqtDDFQ&m=7s21kJzzEs9i-10CQpO4u3Vibm7pRvOyOR0yZfnAN-I&s=ZUMOrdojWEsUDaqeWEZcxa6qOXmaYtqNF_1fvqos3zc&e=.
Thanks, this helps narrow down possible issues.
Is this happening for all notebooks or just specific ones for you?
It’s happened on all of the notebooks.
On Oct 21, 2019, at 11:38 AM, Matthew Seal notifications@github.com wrote:
Thanks, this helps narrow down possible issues.
Is this happening for all notebooks or just specific ones for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jupyter_nbconvert_issues_1105-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DABITW7N4HXSEJBJYZDGBMIDQPXLIVA5CNFSM4I4AWTP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB27DWY-23issuecomment-2D544600539&d=DwMCaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zsSSYjagiVvyJIwbqtDDFQ&m=16zh5V_QnFuKdDjgkJsDhADsKerwYGxm7YyHEE8y2Lo&s=2DLwV1MXs06WkdSC4nbhjfgNk_o7J_gvizq7zAmRrlY&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABITW7MNRKVJHDCU47PXOEDQPXLIVANCNFSM4I4AWTPQ&d=DwMCaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zsSSYjagiVvyJIwbqtDDFQ&m=16zh5V_QnFuKdDjgkJsDhADsKerwYGxm7YyHEE8y2Lo&s=1GaCSZd_Rxz4ntGqR2TTd1qBoLouBuGnM5DytcJGZGI&e=.
@cyhsu stripped your personal info forwarded by email from your last comment fyi.
Is this a fresh setup or an existing one that's been upgraded? If you make a new conda environment does it have the same issue? Thanks for filling in details. I'll have to go do some testing in a conda env and see if I can track down why this was happening.
This is a fresh setup. I haven't tried to upgraded the conda environment.
I have a similar setup so I can try to reproduce this with a fresh conda environment and track down why the template registration is incorrect.
Hmm I am having difficulty reproducing. I'm on a slightly newer version of conda is the only differences in setup as described. Is it possible that your jupyter server process has an odd path assignment? Maybe it's not using the nbconvert install from your conda env? I'm somewhat guessing why it's failing for you at this point.
I have tried it several time thought the conda install on the supercomputer in order to export to PDF.
Maybe it is as your said that the Jupiter server process has an odd path assignment?
On Oct 24, 2019, at 12:37 PM, Matthew Seal notifications@github.com wrote:
Hmm I am having difficulty reproducing. I'm on a slightly newer version of conda is the only differences in setup as described. Is it possible that your jupyter server process has an odd path assignment? Maybe it's not using the nbconvert install from your conda env? I'm somewhat guessing why it's failing for you at this point.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jupyter_nbconvert_issues_1105-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DABITW7L2QADEIYQMLS52CM3QQHMOZA5CNFSM4I4AWTP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECF2X4Q-23issuecomment-2D546024434&d=DwMCaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zsSSYjagiVvyJIwbqtDDFQ&m=8jO8uYbYybYiosGeKSaTZcs5y3kn6OdEz-qGFr_Plhs&s=oaVxP6nEkKojzZ26JXWdgHCRYYLV_gW1WkKZBJYL858&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABITW7JIDS2JSG276KL4Y43QQHMOZANCNFSM4I4AWTPQ&d=DwMCaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zsSSYjagiVvyJIwbqtDDFQ&m=8jO8uYbYybYiosGeKSaTZcs5y3kn6OdEz-qGFr_Plhs&s=Tv_V7ADBrewAo3WkLI95rwK2kf8oh0bkFTtYF4g7YKE&e=.
I agree this sounds to me like the nbconvert that's called from the command line is different from the nbconvert called by the jupyter server. I wonder it jupyter --paths could reveal a folder where an old copy of nbconvert might be living? No idea is jupyter pulls from those folders for its import paths though.
as @choldgraf said there are differences in nbconvert launched by the webapp and the command line, if I execute jupyter nbconvert --to PDF notebook.ipynb everything works well (I'm a Linux user, Ubuntu 19.04)
Forgive my github noob-ness. I ran into same error and solved using these steps:
@FeFiFoFu Likely unrelated to the original issue -- that's part of the installation instructions as we don't support this from the setuptools directly because the dependency is so large and complicated for latex support.
Same problem for one year running, happening again on a new computer fresh install; installed MacTex first, but JupyterLab returns the same error.
tl;dr
Do what @FeFiFoFu says by installing XeTeX you resolve the issue in jupyter and terminal. Make sure nbconvert is installed on conda if you run your notebook via conda.
sudo apt-get install texlive-xetex
I've had the same Issue. First i had to make sure that nbconvert was installed on conda and not on pip, otherwise it states nbconvert is missing Install nbconvert on conda
conda install nbconvert
@GJGits suggesting to try out jupyter nbconvert --to PDF notebook.ipynb. This method is useful, because it produces a log stating what is going on and what was going wrong. From that I resolved this strip trailing newline error by installing XeTeX, because that's apparently a requirement of the nbconvert package.
I have nbconvert installed and used MacTeX; opening the TeXLive app I can see xetex x86_64-darwin installed; but I still see the error. I am trying to set my new computer without messing it up with sudo installs, and this really should not be such a common problem for users.
I'm having the same issue when exporting a notebook as pdf, "nbconvert failed: no filter named 'strip_trailing_newline'" Thank you to @NtheFarmer , running prompt command to convert presents a useful log which indicated a dependency on 'xelatex'. However, I get a 404 error when trying to download xelatex from http://www.texts.io/support/0002/ ... does anyone know of another site to dl from?
Most helpful comment
tl;dr
Do what @FeFiFoFu says by installing XeTeX you resolve the issue in jupyter and terminal. Make sure nbconvert is installed on conda if you run your notebook via conda.
sudo apt-get install texlive-xetexI've had the same Issue. First i had to make sure that nbconvert was installed on conda and not on pip, otherwise it states nbconvert is missing
Install nbconvert on conda conda install nbconvert@GJGits suggesting to try out
jupyter nbconvert --to PDF notebook.ipynb. This method is useful, because it produces a log stating what is going on and what was going wrong. From that I resolved this strip trailing newline error by installing XeTeX, because that's apparently a requirement of the nbconvert package.