4 Replies Latest reply on May 27, 2016 10:53 AM by ritika.gobse

    Error in publishing VizAlert datasource and running the VizAlertsDemo

    ritika.gobse

      hi,

      I just downloaded vizAlerts and was following the install_guide. I am having 2 issues:

       

      1) I am working with the VizAlertsDemo.twb example in the install_guide. When I run the vizalerts.py file I get this error:

      2016-05-26 14:30:23 - [ERROR] - merge_pdf_attachments - Could not generate merged PDF for filename EastSales.pdf:

      'unicode' object has no attribute 'write'

      2016-05-26 14:30:23 - [ERROR] - send_email - Email failed to send: 'unicode' object has no attribute 'write'

       

      The alert works fines when I tried to test a general subcription. I have attached a snapshot of the error.

       

      2)Also I tried to publish the VizAlerts.tdsx datasource on the tableaus erver 9.3 and it gives me this error: "Cant find the referenced file". I have attached the snapshot of the error

      I am new to tableau. Please let me know if I am doing something wrong. Thanks.

        • 1. Re: Error in publishing VizAlert datasource and running the VizAlertsDemo
          Matt Coles

          Hi Ritika. For the first issue, did you install the module by running the following command?:

           

          pip install pypdf2

           

          If so, did it look like it installed properly? I'm not sure what could cause that problem yet, but if pypdf2 is installed and working, it's either bad error handling that's masking the true problem, or a new bug altogether.

           

          For the second issue, I'm not sure what caused that for you, but if you just open the .tdsx file in Tableau Desktop, then right-click it and Publish to Server, without removing the extract or scheduling it for a refresh, you shouldn't be getting that error. It's meant to be a simple static datasource that makes it easier for people to copy the fields from into their own workbook.

          If you still have trouble with the datasource, would you mind uploading step-by-step screenshots so I can see what you're doing?

          • 2. Re: Error in publishing VizAlert datasource and running the VizAlertsDemo
            ritika.gobse

            Hi Matt Coles So I could publish the data source on the server, I was getting a pop up about credentials and clicked no so it got published. About the first issue, no I did not use pip install. I was get connection timeout error so I manually downloaded the modules and did a python setup.py install.

            Also I tried just subscribe to my view and it gives a bunch of errors. I have attached part of the log file here. I think I have not filled the vizalerts.yaml file properly or something. The smtp server i am using works fine, I am using the same for my normal subscription on tableau. Thanks for replying.

            • 3. Re: Error in publishing VizAlert datasource and running the VizAlertsDemo
              Matt Coles

              The log shows that you're doing well--everything worked except that it can't send email through your SMTP server. The problem is your authentication. My guess is that either you're trying to use encryption when your SMTP server doesn't support it, or you're not trying to use encryption when your SMTP requires it.

               

              So in vizalerts.yaml, try setting smtp.ssl to true. It currently defaults to false:

               

              smtp.subject: 'ALERT: VizAlerts failed to execute properly'  # subject line in exception emails sent to admin
              smtp.ssl: false                                # use encryption when connecting to SMTP server
              smtp.user: null                                # username for account used to connect to SMTP server (null for no authentication)
              smtp.password: null                            # password for account used to connect to SMTP server (null for no authentication)
              

               

              Also make sure your username and password are correct, if your SMTP server requires it.

               

              Let me know how that goes.

              1 of 1 people found this helpful
              • 4. Re: Error in publishing VizAlert datasource and running the VizAlertsDemo
                ritika.gobse

                hi matt coles,  no authentication was required. Thanks for helping!