LaTeX forum ⇒ LyXPDF: There was an error opening this document

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
andrelyx
Posts: 5
Joined: Mon May 13, 2024 11:29 am

PDF: There was an error opening this document

Postby andrelyx » Sat Nov 23, 2024 1:17 pm

I am new to LyX, using gradually more for a few months.

I noticed a strange behavior. When I choose ctrl-R to compile the document and preview the PDF, I receive the message:

"There was an error opening this document. This file cannot be found."

However, when I repeatedly do ctrl-R, the document eventually compiles and the PDF is shown.

How can I fix this problem? I have seen the path in Tools/Preferences, but I am not sure if there is an option there to change.

When the PDF finally opens, I notice that it is in a temporary directory, ...Temp\nsz4A1C.tmp\doc.pdf. Wouldn't it had to be in the same directory of the doc.lyx file?

Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
Haiopaio
Posts: 4
Joined: Sun Nov 03, 2024 10:11 am

PDF: There was an error opening this document

Postby Haiopaio » Mon Nov 25, 2024 11:24 am

The files created during the "compilation process" and the resulting PDF file are always stored in the temporary directory. This temporary directory is separate from the doc lyx file and the path can be seen in Lyx Preferences or in the About Lyx Dialog. I run LyX 2.4.2.1 and the about LyX dialog offers to open that directory. I'm not sure about older LyX versions.
Feel free to change the path in the LyX Preferences to a suitable path to host that temporary directory.
A restart of LyX might be needed to activate such change.

I do not know why your system has problems in accessing that temporary directory. You always can copy that path and open that directory directly with your PDF application or a file explorer to access all the files created by LyX.
There might be a file permission problem. You will see once you try opening that path with a file explorer.

andrelyx
Posts: 5
Joined: Mon May 13, 2024 11:29 am

PDF: There was an error opening this document

Postby andrelyx » Tue Nov 26, 2024 1:22 pm

Thank you for your message. I checked the default temporary path, and it looks fine. Using only standard characters in the path. Nothing in principle that could prevent LyX to access it.

What is strange is that I have to try several times ctrl-R to have the document compiled.

Haiopaio
Posts: 4
Joined: Sun Nov 03, 2024 10:11 am

PDF: There was an error opening this document

Postby Haiopaio » Tue Nov 26, 2024 4:34 pm

I don't have a good suggestion. I have heard about people having problems with folders in a path being synchronized with one-drive or other cloud software.


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 10 guests