Reporting

Getting error with scheduled email alerts that send PDFs.

Explorer

I'me getting the following error if the scheduled emails for PDF delivery for my dashboard. It only occurs in emails, not when I export as PDF. 

ERROR sendemail:1167 - An error occurred while generating a PDF: Failed to fetch PDF (status = 400): b'Unable to render PDF.

Bailing out of Integrated PDF Generation. Exception raised while preparing to render "Untitled" to PDF. a bytes-like object is required, not \'str\'
Labels (1)
Tags (3)
0 Karma

Explorer

I ran into this same issue exactly and troubleshot for hours. What ended up solving it for us was looking at the source html of the dashboard we were trying to retrieve via email. When opening up the html, we noticed the following stanza:

  <!-- Dummy search to pull selected time range earliest and latest date/time -->
  <search>
    <query>| makeresults</query>
    <earliest>-7d@w0</earliest>
    <latest>@w0</latest>
    <done>
      <eval token="tokTime">$job.earliestTime$</eval>
      <eval token="tokEarliestTime">strftime(strptime($job.earliestTime$,"%Y/%m/%dT%H:%M:%S.%3N %p"),"%m/%d/%y %I:%M:%S.%3N %p")</eval>
      <eval
 
We removed this and it worked just fine. Hope this helps. 

Explorer

Did you remove the whole thing or a certain part of it?

0 Karma

Explorer

only the stanza posted. 

0 Karma