Issue Number | 4109 |
---|---|
Summary | URL Check Report Error on PROD |
Created | 2016-05-24 12:20:27 |
Issue Type | Bug |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2016-11-15 07:52:37 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.184882 |
We have been getting the following error message when we run the "URL Check" report.
"Caught exception: global name 'Error' is not defined"
The error occurs when you have the following options selected:
DocType = Summary
No Audience Selected
Not Language Selected
All Page Titles Selected
It also fails when you have "Glossary Term Concept" selected and all other options as before. I assume that there are other options that may fail as well. I was however able to get the report to run by selecting "URL Errors". So, it appears that it is failing when you have either "All Page Titles" or "Page Title Mismatches" selected.
Are you getting this error even when you're selecting the two required elements (Audience and Language)?
It is a problem that should get fixed but if the report succeeds when the user provides all necessary options I wouldn't mark this issue as a Major.
For my information:
The error message isn't displayed in the log-file but is part of the
progress information stored in the table
batch_job.
We discovered in the status meeting that the error message still comes up when both an audience and language are chosen.
This report appears to be working again on PROD. I selected all the different options and they all ran successfully. The error message only comes up if I do not select any options under "Required for Summary or Glossary". Since the error error message "Caught exception: global name 'Error' doesn't tell the user what is wrong we probably want to keep this issue open and modify it to alert users when no Audience or Language is selected under the "Required for Summary or Glossary" . If you agree, I will modify the title to reflect the suggestion.
Well, it looks like I spoke too soon :-). I tried to do another round of testing after I got the first error and now I am getting the exception errors again even if I make the right selections by not leaving the "Required for Summary or Glossary" fields blank. So, it appears the error messages happen after the first run with the "Required for Summary or Glossary" fields blank. Any subsequent run produces the error message.
"Caught exception: 'dict' object is not callable"
Error message from running the report without the audience and language and with the All Page Titles option selected in Review meeting.
Fixed on DEV, I think. The fix is in the ocecdr-4114 branch (for the Python upgrade), so it will only make it into the Einstein branch once the Python upgrade has been promoted and that branch has been folded into trunk and the Einstein branch. To capture the changes for this fix:
Index: CdrLongReports.py===================================================================
--- CdrLongReports.py (revision 14297)
+++ CdrLongReports.py (working copy)
@@ -2305,7 +2305,7 @@
# Have we already seen this web page?
if resultCache.has_key(url):
# Get the result of previous fetch- pageFlag, pageTitle = resultCache(url)
+ pageFlag, pageTitle = resultCache[url]
# If previous fetch failed, don't try again, re-report failure
if pageFlag != "Error":@@ -2378,7 +2378,7 @@
try:
parser.feed(uniPageHtml)
pageTitle = parser.getTitleContent()- except Error, info:
+ except Exception, info:
pageFlag = "Error"
errMsg = "Error parsing web page to find the title: %s" \ % str(info)
I am not sure if I should be testing this yet but I got the attached error message while testing on DEV.
Please try it again.
It is working correctly now. Thanks!
Verified on QA
File Name | Posted | User |
---|---|---|
URL ERROR.JPG | 2016-12-14 13:44:35 | Osei-Poku, William (NIH/NCI) [C] |
Elapsed: 0:00:00.001439