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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...