LyX can't build PDFs / missing begin document

Bug #1875909 reported by M Conrad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lyx (Ubuntu)
New
Undecided
Unassigned

Bug Description

Reconfigure results in:

```
Traceback (most recent call last):
  File "/usr/share/lyx/configure.py", line 1899, in <module>
    ret = checkLatexConfig(lyx_check_config and LATEX, bool_docbook)
  File "/usr/share/lyx/configure.py", line 1420, in checkLatexConfig
    for line in open(file, 'r', encoding='utf8').readlines():
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 845: invalid start byte
support/Systemcall.cpp (276): Systemcall: 'python3 -tt "/usr/share/lyx/configure.py" --binary-dir="/usr/bin/"' finished with exit code 1

```

Running 'python3 -tt "/usr/share/lyx/configure.py" --binary-dir="/usr/bin/"' in a terminal does *not* result in the error LyX is reporting and instead appears to complete successfully.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: lyx 2.3.4.2-2
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: MATE
Date: Wed Apr 29 10:50:55 2020
InstallationDate: Installed on 2014-05-08 (2182 days ago)
InstallationMedia: Linux Mint 16 "petra" - Release amd64 20131126
SourcePackage: lyx
UpgradeStatus: Upgraded to focal on 2020-04-25 (4 days ago)

Revision history for this message
M Conrad (mconrad202) wrote :
Revision history for this message
M Conrad (mconrad202) wrote :

Exporting to xetex format then running xelatex on the resulting *.tex file results in a successful PDF build.

Revision history for this message
M Conrad (mconrad202) wrote :

I have narrowed this down to having UTF-8 characters in the path where the document is stored.

This is a new issue for me. I have for years been using this folder structure with the UTF-8 name of "ᏣᎳᎩ".

What is really perplexing is the fact that LyX copies all the necessary files to run the xelatex to a temp folder in /tmp, then the xelatex fails. If I run xelatex in that same temp folder with those same files, the xelatex command completes successfully.

It is acting like some python thingy is assuming that things are encoded as iso-8859-1 or something?

Revision history for this message
Jean-Marc Lasgouttes (jmarc) wrote :

As far as I understand, what you are seeing is upstream ticket #11736, that will be fixed in 2.3.5. For more details, see
https://www.lyx.org/trac/ticket/11736

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.