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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...