Issue Number | 4521 |
---|---|
Summary | Unicode encoding error in DISWithMarkup.py |
Created | 2018-09-17 11:00:54 |
Issue Type | Bug |
Submitted By | Englisch, Volker (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2019-12-03 14:17:44 |
Resolution | Won't Fix |
Path | /home/bkline/backups/jira/ocecdr/issue.233156 |
While I was looking through our log files I noticed a bug in the program DISWithMarkup.py that should be fixed. The error message in the file debug.log is this:
!4428 Tue Sep 4 15:38:43 2018: cdrcgi.unicodeToLatin1 got non-unicode string. Stack trace follows
File "D:\Inetpub\wwwroot\cgi-bin\cdr\DISWithMarkup.py", line 292, in <module>
cdrcgi.sendPage(header + report + footer)
File "D:\cdr\Lib\Python\cdrcgi.py", line 2460, in sendPage
%25s""" %25 (redirect, textType, unicodeToLatin1(page))
File "D:\cdr\Lib\Python\cdrcgi.py", line 2514, in unicodeToLatin1
"Stack trace follows", stackTrace=True)
File "D:\cdr\Lib\Python\cdr.py", line 4492, in logwrite
traceback.print_stack(file=f)
I was looking through the program to see if I could find out where
the problem is. I was unable to recreate the failure on DEV even after
including Spanish text within the DIS text and markup.
~oseipokuw, please have
users report whenever this report isn't showing up on PROD so that I can
reproduce the behavior on DEV and fix it.
I checked the log file again and noticed this error appearing again on Jun 7th and Jul 9th.
~volker: This problem
should not occur once Kepler has been deployed, assuming all of the CGI
scripts get proper testing prior to the release deployment. The
unicodeToLatin1()
function no longer exists, and the
sendPage()
function which used to call it now results in an
Exception if bytes are passed to it instead of a Unicode string, rather
than just silently logging the problem. I recommend we close this ticket
open separate tickets for any CGI scripts which slip through the Kepler
testing cracks, if there are any.
Yes, I agree. I was hoping Python 3 would make this ticket mute.
Closing issue.
Elapsed: 0:00:00.001327