My_webapp and python3-pdfkit

Server update Debian stretch

In my_webapp application, I’ve got a php script which runs a python script

<?php
$command = escapeshellcmd('/usr/bin/python3 /var/www/my_webapp__3/www/pandas_csv.py');
$output = Shell_exec($command);
?>

And the python script

import pdfkit    
[ .... ] 
f = open('output.html','w',encoding='ISO-8859-14' )
a = df.to_html()
f.write(a)
f.close()

pdfkit.from_file('output.html', 'output.pdf')

The file output.html is weel created but not the file output.pdf.
No errors to the output of the screen and I don’t know where are the logs…

Is it possible to show the dev errors only for this application only ? Or if anyone knows where the error might come from?

I have test the script in a local server, worfs fine (but under debian sid…perhaps an problem of version of the package ?)

Any help is welcome , thanx :wink:

I would go check the php-fpm logs (in /var/log or via the Services view in the webadmin) but really debugging your super-custom php/python script is completely out of scope of yunohost itself…

Ok I understand, thx

OK I solved this issue for info : wkhtmltopdf without X server need a particular configuration.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.