Hmm, that's tough. We might be overly restrictive in our checks for "funny characters". There is a set of punctuation characters we remove from the first part of the addresses, then we do a check to ensure that everything remaining is an alphanumeric. We are not including apostrophes in that list, though, so it is not being removed, then it subsequently fails the alphnumeric test. You can see this in VizAlerts/emailaction.py at master · tableau/VizAlerts · GitHub on line 236.
If you are running the windows compiled executable, there's not a quick way to fix this without us making a fix and compiling a new version. If you are running the Python version, then I would recommend making a small edit to Line 236 on the file linked above and adding an apostrophe character. You would use a backlash, then an apostrophe so that Python knew you meant a real apostrophe, and not the end of the string.
Sorry for the disruption. I've created an issue in GitHub to track this problem and fix it.
Jolie is one of my users. I altered the emailaction.py as instructed...
...but the same error happens
I checked the offending email address and it is plain text (firstname.lastname@example.org) and uses the apostrophe (ASCII 39), not the grave accent (ASCII 96). Should there be a backslash in the email address itself? e.g. first.o\'email@example.com
TS = 2018.1.12
VA = 2.1.0
No, don't put the backslash in the email address itself. So it's ASCII 39, which is a single quote / apostrophe, so the format you have above in your image should have worked, I think. I'm not sure why it's not, but since we're in the code anyway, let's make a different alteration that will be more certain to at least work around the issue for you:
if localpart.isalnum() and host.isalnum(): return None # Email address is fine. else: errormessage = u'Address has funny characters' log.logger.error(errormessage) return errormessage
else: return None # Email address is fine.
That will skip the portion that validates that the email address is all alphanumeric characters, which is overly restrictive since it bars valid email addresses from being used. Honestly, I'm not really sure why we are being so strict. See if that helps, though.
Son of a I'm using the executable method, not the Python method I was dissecting the log and error emails, trying to figure out what was going wrong...
Looking at the documentation I don't see how to reference the Python method for Windows Task Scheduler, there's only an explanation for the vizalerts.exe method and for upgrading. Did I miss it in the install document?
1 of 1 people found this helpful
you would call "python D:\Application\Tableau\VizAlerts\vizalerts.py". But keep in mind that you have to have Python installed and all the modules, some of which may have been updated since you last ran the python version. Try it via command line first.
1 of 1 people found this helpful
BTW here’s a link to an older version of the docs (pre-executable days) that has screenshots for setting up the scheduled task for Python:
Thanks Matt. Tested and failed for .py execution. I'll wait for the next executable version.
Hi Matt -- So... is there an ETA on when there is a new version/release? Would this issue be fixed in the new version?
Hi Jolie. I'm very time-constrained right now, so it may be several weeks. If this individual has another email address that can be used, I would recommend modifying the VizAlert to do an ad-hoc substitution in the Email To calc, or an upstream calc. Using a distribution list might be a good workaround. Otherwise, you could simply filter them out so that the overall alert would run just fine, just not for them. Final alternative is trying to get the Python scripts to work.