Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid regular expression found - even after changing data.coldelimiter #186

Closed
Inity949 opened this issue Nov 17, 2021 · 9 comments
Closed

Comments

@Inity949
Copy link

Hi everyone,

Don't know if this fits here but since 3 days I'm trying to get vizalerts working.

When I launched the exe the first time after setting everything up, following the installation instruction, I always get the following error message back :
email body: Could not process source viz data from VizAlertsConfig/ScheduledTriggerViews for the following reason:<br/><br/>Invalid regular expression found. Could not evaluate expres sion '' in the field allowed_from_address. Raw error:<br/><br/>allowed_from_address

After googling this error is changed the data.coldelimiter into ';' as the generated CSV uses semicolons as column separator. But I still get the same error. I also checked my REGEX entries and these seems fine too.

Don't know what to do. Here are the logfile, the vizalerts.yaml and a screenshot of the workbook. Hope you can help me.
vizalerts.zip

@mcoles
Copy link
Contributor

mcoles commented Nov 18, 2021

Did you ever modify either the default_allowed_from_address parameter, or the allowed_from_address field in the VizAlertsConfig workbook? To me it looks as though one or the other was modified to result in an empty string being passed in. I see from the image you attached that the parameter retains the standard value, but this could be caused by the calculated field being modified. Or, possibly it was altered then the standard workbook was published, but as a different workbook, so it's still looking at the first one? Those are both long shots, since you seem like you're the thorough type and wouldn't make such a mistake...my only other idea at this point is to ask you to attach the CSV that gets downloaded that we're tripping up on parsing (sanitized, of course).

@Inity949
Copy link
Author

Inity949 commented Nov 18, 2021

Mcoles,

First of all, thanks for your fast reply. I hope my English isn't too bad :)

I did only modify the default_allowed_from_address in the workbook into .. Different users from different domains have acces to this Tableau Server and in order to match their respectiv domain I used this, is this ok ? I also tried with support@******.eu but that gave the same result.

Mistakes can be done and I'm assuming that my work can't be 100% perfect. So if something seems wrong to you I can double check it.

Sorry I forgot the CSV and here it is.

20211117153631221400_MainThread_VizAlertsConfig-ScheduledTriggerViews.csv

@mcoles
Copy link
Contributor

mcoles commented Nov 18, 2021

Thanks! Your English is just fine :). So yeah, everything looks fine there. I'm not sure what would cause this, so here are some more questions...

  • Would you mind going to Control Panel -> Region and screenshotting this for me? (cllick Additional Settings to show the right-hand pane)
    image

-If you have Excel installed on your VizAlerts machine, what happens if you open the raw CSV file with it? Does it parse it correctly without any modifications (such as Text to Columns)?

@Inity949
Copy link
Author

Ok, so that is another thing i forgot to mention. I allready checked this parameter, and as my OS is in French the settings are the following :
image

I also tried to change the list separator into ',', but even after a restart of the VM, the generated CSV file columns are delimited by a semicolon ....

Unfortunaly I have no Excel installed on the machine, but when I open the CSV file on my own computer (same language settings) the columns are correct.

@Inity949
Copy link
Author

Inity949 commented Nov 22, 2021

I don't know if this is important, but I like you to know that the Vizalerts and Tableu Server are running on the same machine. It's a PoC but when I will mount the production environment both services could be separated on two different machines.

@mcoles
Copy link
Contributor

mcoles commented Nov 22, 2021

The only thing I can think of is that support for Python 3 might have broken this. Would you mind trying the previous release to see if you still get this problem? It's possible that we just haven't heard about this issue yet because no other admins from regions using alternate delimiters have tried upgrading to the latest version...or just haven't bothered telling us.

https://github.com/tableau/VizAlerts/releases/tag/v2.1.1

@Inity949
Copy link
Author

Dear @mcoles,

You were right. With version 2.1.1. everything works fine.

@mcoles
Copy link
Contributor

mcoles commented Nov 24, 2021

Glad to hear it! Looks like we have a bug to fix--thanks for reporting it!

@SM-Spryfox
Copy link

SM-Spryfox commented Jan 26, 2023

@mcoles I've been getting the error. Downgrading to 2.1.1 did not help at all. Going through the source code, it seems that the trigger data is not read properly from the temp file. The content of the temp file looks like this (real field values replaced by generic aliases):
action_enabled_email;action_enabled_sms;alert_type;allowed_from_address;allowed_recipient_addresses;allowed_recipient_numbers;customized_view_id;data_retrieval_tries;force_refresh;from_number;is_test;is_triggered_by_refresh;notify_subscriber_on_failure;owner_email;owner_friendly_name;owner_sysname;phone_country_code;priority;project_id;project_name;ran_last_at;run_next_at;run_next_at;schedule_frequency;schedule_id;schedule_name;schedule_type;site_id;site_name;subscriber_domain;subscriber_email;subscriber_license;subscriber_sysname;subscriber_user_id;subscription_id;task_threads;timeout_s;view_id;view_name;view_owner_id;view_url_suffix;viz_data_maxrows;viz_png_height;viz_png_width;workbook_id;workbook_repository_url 1;0;simple;myuser@mydomain\.biz;.*mydomain\.de;.*;;2;True;+10268675309;False;False;True;me@mydomain.biz;My Name;username;US;50;1;Standard;2023-01-26 19:30:00;2023-01-26 19:45:00;2023-01-26 19:45:00;Hourly;127;ѴizAlerts – [15 minutes];0;1;Default;mysite@mydomain.biz;Author;username;5;6;1;120;73;Walkthrough #1 - 2;5;VizAlertsDemo/Walkthrough1-2;10000;1500;1500;15;VizAlertsDemo

The csv reader ends up reading this as as a dictionary with all the characters until the line break as the one key:
dict_keys(['action_enabled_email;action_enabled_sms;alert_type;allowed_from_address;allowed_recipient_addresses;allowed_recipient_numbers;customized_view_id;data_retrieval_tries;force_refresh;from_number;is_test;is_triggered_by_refresh;notify_subscriber_on_failure;owner_email;owner_friendly_name;owner_sysname;phone_country_code;priority;project_id;project_name;ran_last_at;run_next_at;run_next_at;schedule_frequency;schedule_id;schedule_name;schedule_type;site_id;site_name;subscriber_domain;subscriber_email;subscriber_license;subscriber_sysname;subscriber_user_id;subscription_id;task_threads;timeout_s;view_id;view_name;view_owner_id;view_url_suffix;viz_data_maxrows;viz_png_height;viz_png_width;workbook_id;workbook_repository_url'])

And the rest of the characters as the value for this key. This ends up causing a key error in the following part of \vizalerts.py:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants