Issue Number | 5009 |
---|---|
Summary | PDQ Partner Notification Email |
Created | 2021-07-27 18:22:41 |
Issue Type | Improvement |
Submitted By | Englisch, Volker (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2022-02-03 12:16:13 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.295051 |
Our PDQ Notification email failed on Monday while trying to read the finished report after the process had already notified all PDQ partners.
The likely cause of the failure is a non-ASCII character - the Microsoft "smart-quotes". I had created a new record for a test partner who is using his middle name which he had submitted in quotes and I copy/pasted that information instead of typing at the keyboard.
Bob suggested to update the software to prevent this error from happening again in case our next partner is named Björn Sørensen.
The file that caused the failure was this:
D:\cdr\output\LicenseeDocs\Job18906\report
This is the error message from the log file:
2021-07-26 15:04:44.554 [ERROR] Notify PDQ Data Partners (PROD ONLY)
started 2021-07-26 15:00:00.016647
Traceback (most recent call last):
File "D:\cdr\Scheduler\cdr_scheduler.py", line 374, in run
getattr(module, class_name)(*args, **self.opts).run()
File "D:\cdr\Scheduler\jobs\data_partners.py", line 139, in run
self.report()
File "D:\cdr\Scheduler\jobs\data_partners.py", line 151, in report
message = open(self.job.report_path).read() + "</ul>"
File "D:\Python\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
The following script in the scheduled jobs directory has been modified to prevent the final email notification summary from failing:
data_partners.py
https://github.com/NCIOCPL/cdr-scheduler/commit/468141b
This change can only be tested internally. I've tested the implemented change on DEV.
Well, our new PDQ contact isn't Björn Sørensen but Lisa Lüscher. The program changes did what was requested and the program isn't failing anymore. However, the display of the name in the email is "Lisa Lüscher". Maybe we can adjust that as well.
I've tried to recreate the issue by sending the file to myself using different mail clients (Outlook and Thunderbird) but I'm unable to recreate the issue on the DEV server. Everything I can see looks correct.
Given that and considering that Lisa Lüscher is a member of a test partner that's not active anymore I don't think it's worth spending more time at this point to investigate further.
You already fixed this, ~volker, which is why it doesn't fail on DEV. You still got the garbled name in the report because the report came from CDR PROD, and Ohm isn't on PROD yet. You can probably reproduce the problem on QA, (or STAGE, if you've already pushed the fix to QA).
Can this be moved to "DEV Verified" ~volker ?
We currently don't have a contact name with non-ASCII characters and I don't want to create on in production.
Closing ticket.
Elapsed: 0:00:00.001467