Reporting

Getting error with scheduled email alerts that send PDFs.

595147
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

jshultz
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. 

595147
Explorer

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

0 Karma

jshultz
Explorer

only the stanza posted. 

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...