FileNotFoundError at /urlpath, after hosting Django project to Heroku

70 views
Skip to first unread message

lejaha...@gmail.com

unread,
Jun 18, 2020, 5:42:29 AM6/18/20
to Django users
Created a an application that generates pdf-files from latex templates saved on the project, using the subprocess('pdflatex nameofTemplate' ) method.
The application works fine, locally. But does not work on the server and returns "[Errno 2] No such file or directory: 'pdflatex mytexfile.tex': 'pdflatex mytexfile.tex'", everytime I call the method to generate the latex files. 

Please kindly advise on how I can make the pdflatex and latex files accessible to my subprocess.call() method.

Kasper Laudrup

unread,
Jun 18, 2020, 6:07:08 AM6/18/20
to django...@googlegroups.com
Hej Lejaha
By installing pdflatex on the server and ensuring its in the path of the
user running the application or giving the full path to the pdflatex
executable in the call to subprocess.

How to install software on the server depends on the OS of the server
and how its maintained and you'll most likely have better luck getting
answers if you ask whoever is maintaining the server.

Kind regards,

Kasper Laudrup

jakote lejaha

unread,
Jun 22, 2020, 4:49:15 PM6/22/20
to django...@googlegroups.com
Thank you very much. Everything worked after specifying the path to the pdflatex.

Virus-free. www.avast.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3b5e415d-4893-4abc-d892-bacd99c9fba2%40stacktrace.dk.
Reply all
Reply to author
Forward
0 new messages