I am converting an HTML to pdf in django function, for this i am using xhtml2pdf pisa module, and the code is
pdf = pisa.CreatePDF(html, file(settings.MEDIA_ROOT+'/tickets_pdf/'+pdfName, "w"))
This code is working and generates pdf but sometime it works and sometime it doesn't work and give error
No handlers could be found for logger “xhtml2pdf”
There is also same question on SO that I have already checked.
No handlers could be found for logger "xhtml2pdf"
But it did not work for me. If my client generates 10 times pdf then at least 4 times it gives this error and in other case it works fine. Is there any solution for this, or i have to generate pdf in other way.