Ask Your Question

Unable to download to PDF

asked 2018-07-17 11:45:03 -0500

danielvolinski gravatar image

updated 2018-07-24 04:08:52 -0500

Iguananaut gravatar image

I'm using SageMath 8.2 on a Windows 10 Native with Jupyter Notebook.

When trying to download to PDF a Jupyter Notebook, I get the following message:

500 : Internal Server Error

nbconvert failed: PDF creating failed, captured latex output:
This is XeTeX, Version 3.14159265-2.6-0.99998 (MiKTeX 2.9.6500 64-bit)
entering extended mode
! I can't find file `/home/danie_000/SageManifolds/test/notebook.tex'.
<*> ...e/danie_000/SageManifolds/test/notebook.tex

Please type another input file name: 
! Emergency stop.
<*> ...e/danie_000/SageManifolds/test/notebook.tex

No pages of output.
Transcript written on texput.log.

It is looking for some file in /home/danie_000 but I don't use that default directory to place my Jupyter files. I've changed my fstab like this:

D:\Users\danie_000\Sage /home/danie_000 ntfs binary,posix=1,acl 0 0

So I use D:\Users\danie_000\Sage instead, a different directory and drive. If SageMath allows changing the default root directory via changing the fstab file, it should also change any command that needs that information!


edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2018-07-18 07:56:20 -0500

Iguananaut gravatar image

This looks like an issue similar to many other issues (such as and some others), where what's happening is Jupyter is searching for an using an external LaTeX distribution in order to do tex->PDF processing. And it is successfully finding your Windows Native MikTeX distribution.

However, since Sage for Windows runs under Cygwin, it is passing UNIX-style file paths to the Windows executables provided by MikTeX, and it does not know how to interpret them.

I will see if I can get an upstream fix to this in nbconvert, or if not there then at least a patch in Sage. In the meantime you can export to .tex and then pass it to your favorite LaTeX renderer manually.

edit flag offensive delete link more

answered 2018-07-18 01:43:35 -0500

Emmanuel Charpentier gravatar image

updated 2018-07-18 11:02:48 -0500

I suppose that

I'm using SageMath 8.2 on a Windows 10 Native with Jupyter Notebook.

means that you have used Erik Bray's Windows/Cygwin installer.

Well, Cygwin is pretty peculiar about its file access. If you want to save somewhere on an network drive, you must manage to give Cygwin access to it. Not really obvious. ISTR that I managed to create some sort of symbolic link (Windows ? Cygwin ? Can't remember at the moment).

But there is more : The Jupyter notebook can access only the directory it's started from (Edit : and its subdirectories) (in other words, you can't climb uptree...). In your case, that means that you have to start "from" your network drive (bloody unlikely IMHO) or somehow create a symlink from your directory to your network drive. I haven't the slightest idea about whether this is possible in Cygwin or not.

Sorry to be unable to be more precise : ATM, I have neither Windows harware connected to a Windows server nor a functional Windows VM....

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-07-17 11:45:03 -0500

Seen: 73 times

Last updated: Jul 18