13 Replies Latest reply on Mar 12, 2017 8:56 AM by dickson.kwong.1

    Invalid regular expression found. Could not evaluate expression ''

    dickson.kwong.1

      Hi All,

       

      I am trying to config the v.2.0.1 and seems like there are some error in my environment/setting,

       

      Initially, I got the following error

       

      Error instantiating alerts from list obtained from server: 'view_url_suffix'

       

      After some research, I found the following and update the data.coldelimiter from ',' to ';'

      I have configured Vizalerts.yaml file, But when I tried to execute python Vizalerts.py script getting error " Could not process source viz data from Book1/Sheet1 for the following reason:  Invalid regular expression found. Could not evaluate expression '"

       

      After I done that, I got an difference error:

       

      Could not process source viz data from VizAlertsDemo/AdvancedAlertsDemo for the following reason:

      Invalid regular expression found. Could not evaluate expression '' in the field allowed_from_address. Raw error:

      allowed_from_address

       

      Then I though I did something wrong with the regular expression, so I changed it to the most basic one .*

      And I still got the exact same error

       

      Here is the file header that I found under the temp folder:

      allowed_from_address,Consolidate Lines,Consolidated Sort,Email Action,Email Attachment,Email Body,Email Footer,Email From,Email Header,Email Subject,Email To

       

      Here is the log file:

      MainThread - 2017-03-06 15:05:55 - [INFO] - LoggerQuickSetup - Logging initialized, writing to .\logs\vizalerts.log_2017-03-06.log

      MainThread - 2017-03-06 15:05:55 - [INFO] - main - VizAlerts v2.0.1 is starting

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - trusted_ticket_test - testing trusted ticket: xxxxxx, xxxxxx, None, None

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - get_trusted_ticket - Generating trusted ticket. Request details: Server: xxxxxx, Site: , Username: xxxxxx, Url: http://xxxxxx/trusted, Postdata: username=xxxxxx.

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - get_trusted_ticket - NOT using SSL and NOT verifying cert

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - get_trusted_ticket - Got ticket: 3BjQ-Xm2DaqXMhri3YyaZLW2

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - trusted_ticket_test - Generated test trusted ticket. Value is: 3BjQ-Xm2DaqXMhri3YyaZLW2

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - get_alerts - Pulling source viz data down

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - get_trusted_ticket - Generating trusted ticket. Request details: Server: xxxxxx, Site: xxxxxx, Username: xxxxxx, Url: http://xxxxxx/trusted, Postdata: username=xxxxxx&target_site=xxxxxx.

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - get_trusted_ticket - NOT using SSL and NOT verifying cert

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - get_trusted_ticket - Got ticket: O4FdD8mpg6iVEVXpYE8-p02E

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - export_view - Getting vizdata from: http://xxxxxx/trusted/O4FdD8mpg6iVEVXpYE8-p02E/t/GBG/views/VizAlertsDemo/AdvancedAlertsTests?&:format=csv&:refresh=y

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - export_view - NOT Validating cert for this request

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - _new_conn - Starting new HTTP connection (1): xxxxxx

      MainThread - 2017-03-06 15:05:55 - [DEBUG] - _make_request - http://xxxxxx:80 "GET /trusted/O4FdD8mpg6iVEVXpYE8-p02E/t/GBG/views/VizAlertsDemo/AdvancedAlertsTests?&:format=csv&:refresh=y HTTP/1.1" 302 0

      MainThread - 2017-03-06 15:06:06 - [DEBUG] - _make_request - http://xxxxxx:80 "GET /t/GBG/views/VizAlertsDemo/AdvancedAlertsTests?&:format=csv&:refresh=y&:embed=y HTTP/1.1" 200 9460

      MainThread - 2017-03-06 15:06:06 - [INFO] - export_view - Attempting to write to: .\temp\20170306150606117000_MainThread_VizAlertsDemo-AdvancedAlertsTests.csv

      MainThread - 2017-03-06 15:06:06 - [INFO] - send_email - sending email: xhg1smtp.corp.xxxxxx,tableau_admin@xxxxxx,aaa@xxxxxx,None,None,ALERT: VizAlerts failed to execute properly,None

      MainThread - 2017-03-06 15:06:06 - [DEBUG] - send_email - email body: Could not process source viz data from VizAlertsDemo/AdvancedAlertsTests for the following reason:<br/><br/>Invalid regular expression found. Could not evaluate expression '' in the field allowed_from_address. Raw error:<br/><br/>allowed_from_address

      MainThread - 2017-03-06 15:06:06 - [ERROR] - <module> - An unhandled exception occurred: Traceback (most recent call last):

        File "vizalerts.py", line 463, in <module>

          main()

        File "vizalerts.py", line 130, in main

          alerts = get_alerts()

        File "vizalerts.py", line 240, in get_alerts

          e.message))

        File "vizalerts.py", line 448, in quit_script

          sys.exit(1)

      SystemExit: 1

      Traceback (most recent call last):

        File "vizalerts.py", line 463, in <module>

          main()

        File "vizalerts.py", line 130, in main

          alerts = get_alerts()

        File "vizalerts.py", line 240, in get_alerts

          e.message))

        File "vizalerts.py", line 448, in quit_script

          sys.exit(1)

      SystemExit: 1