Skip to content

Better error messages and documentation for dependencies #51

@FranseFrikandel

Description

@FranseFrikandel

Description of the issue

So, as a user of Overleaf, and thus not having a local LaTeX distribution installed, the first time trying to use this package didn't work. I found it out quite quickly by taking a quick peak in the sourcecode, however the package documentation doesn't appear to really mention the requirements of having a LaTeX distribution installed, and the error you get is a very undescriptive FileNotFoundError with nothing pointing to what exact file it is missing.

The error message I got:

Traceback (most recent call last):
  File "C:\Users\username\path\to\file.py", line 200, in <module>
    x.write("xdsm", cleanup=True, quiet=True)
  File "C:\Python310\lib\site-packages\pyxdsm\XDSM.py", line 628, in write 
    subprocess.run(command, check=True)
  File "C:\Python310\lib\subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Python310\lib\subprocess.py", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python310\lib\subprocess.py", line 1435, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified 

Potential solution

Solving the issue would be two-fold. Firstly, the error message should be more descriptive. An error message saying pdfLaTeX wasent found would be a lot more helpful.

Secondly, the "installation" documentation should mention a LaTeX environment is required for proper operation.

I would be happy to look into making a PR for this if this would be desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions