CDR Tickets

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
Description

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.

Comment entered 2016-05-25 13:43:11 by Englisch, Volker (NIH/NCI) [C]

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.

Comment entered 2016-05-25 13:44:36 by Englisch, Volker (NIH/NCI) [C]

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.

Comment entered 2016-05-26 14:40:28 by Juthe, Robin (NIH/NCI) [E]

We discovered in the status meeting that the error message still comes up when both an audience and language are chosen.

Comment entered 2016-09-08 13:02:09 by Osei-Poku, William (NIH/NCI) [C]

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.

Comment entered 2016-09-08 13:10:01 by Osei-Poku, William (NIH/NCI) [C]

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.

Comment entered 2016-09-08 14:00:01 by Osei-Poku, William (NIH/NCI) [C]

"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.

Comment entered 2016-11-15 07:52:18 by Kline, Bob (NIH/NCI) [C]

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)
Comment entered 2016-12-14 13:45:51 by Osei-Poku, William (NIH/NCI) [C]

I am not sure if I should be testing this yet but I got the attached error message while testing on DEV.

Comment entered 2016-12-14 14:17:00 by Kline, Bob (NIH/NCI) [C]

Please try it again.

Comment entered 2016-12-14 15:19:39 by Osei-Poku, William (NIH/NCI) [C]

It is working correctly now. Thanks!

Comment entered 2017-01-10 19:25:45 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA

Attachments
File Name Posted User
URL ERROR.JPG 2016-12-14 13:44:35 Osei-Poku, William (NIH/NCI) [C]

Elapsed: 0:00:00.001439