| TypeError | Python 2.4.3: /usr/bin/python Wed Feb 22 19:01:13 2012 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /home3/crawlste/public_html/cgi-bin/page_view |
| 121 html_to_display = 'Content-Type: text/html\n\n' |
| 122 html_to_display += self.html |
| 123 print html_to_display |
| 124 |
| 125 runCore() |
| runCore = <class __main__.runCore> |
| /home3/crawlste/public_html/cgi-bin/page_view in __init__(self=<__main__.runCore instance>) |
| 39 |
| 40 # SImply load the content |
| 41 self.make_html_replacements() |
| 42 self.display_site() |
| 43 |
| self = <__main__.runCore instance>, self.make_html_replacements = <bound method runCore.make_html_replacements of <__main__.runCore instance>> |
| /home3/crawlste/public_html/cgi-bin/page_view in make_html_replacements(self=<__main__.runCore instance>) |
| 107 |
| 108 def make_html_replacements(self): |
| 109 core_html = self.get_core_html() |
| 110 self.html = self.html.replace("__CORE__", core_html) |
| 111 |
| core_html undefined, self = <__main__.runCore instance>, self.get_core_html = <bound method runCore.get_core_html of <__main__.runCore instance>> |
| /home3/crawlste/public_html/cgi-bin/page_view in get_core_html(self=<__main__.runCore instance>) |
| 80 page_header = html_library.get_library_element("page_header", self.user, self.page, None) |
| 81 page_menu = html_library.get_library_element("page_menu", self.user, self.page, None) |
| 82 page_construct = html_library.get_library_element("get_page_view_construct", self.user, self.page, None) |
| 83 |
| 84 if self.message: |
| page_construct undefined, global html_library = <module 'utils.html_library' from '/home3/crawlste/public_html/cgi-bin/utils/html_library.pyc'>, html_library.get_library_element = <function get_library_element>, self = <__main__.runCore instance>, self.user = None, self.page = {'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}, builtin None = None |
| /home3/crawlste/public_html/cgi-bin/utils/html_library.py in get_library_element(library_element='get_page_view_construct', user_dict=None, site_dict={'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}, replacements=None, *args=()) |
| 1053 |
| 1054 def get_library_element(library_element, user_dict, site_dict, replacements, *args): |
| 1055 return htmlLibrary().get_library_element(library_element, user_dict, site_dict, replacements, *args) |
| 1056 |
| 1057 def get_template(template_name, page_title=None, user_dict=None): |
| global htmlLibrary = <class utils.html_library.htmlLibrary>, ).get_library_element = <unbound method htmlLibrary.get_library_element>, library_element = 'get_page_view_construct', user_dict = None, site_dict = {'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}, replacements = None, args = () |
| /home3/crawlste/public_html/cgi-bin/utils/html_library.py in get_library_element(self=<utils.html_library.htmlLibrary instance>, library_element='get_page_view_construct', user_dict=None, site_dict={'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}, replacements=None, *args=()) |
| 98 html = self.get_construct_INDEX(user_dict) |
| 99 if library_element == "get_page_view_construct": |
| 100 html = self.get_construct_PAGE_VIEW(user_dict, site_dict) |
| 101 if library_element == "notifications_construct": |
| 102 html, full_html = self.get_construct_NOTIFICATIONS(user_dict, site_dict, args[0]) |
| html = '', self = <utils.html_library.htmlLibrary instance>, self.get_construct_PAGE_VIEW = <bound method htmlLibrary.get_construct_PAGE_VIEW of <utils.html_library.htmlLibrary instance>>, user_dict = None, site_dict = {'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...} |
| /home3/crawlste/public_html/cgi-bin/utils/html_library.py in get_construct_PAGE_VIEW(self=<utils.html_library.htmlLibrary instance>, user_dict=None, site_dict={'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}) |
| 134 def get_construct_PAGE_VIEW(self, user_dict, site_dict): |
| 135 from utils import page_view_construct |
| 136 html = page_view_construct.get_view_for_page(user_dict, site_dict) |
| 137 return html |
| 138 |
| html undefined, page_view_construct = <module 'utils.page_view_construct' from '/home3...blic_html/cgi-bin/utils/page_view_construct.pyc'>, page_view_construct.get_view_for_page = <function get_view_for_page>, user_dict = None, site_dict = {'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...} |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in get_view_for_page(user_dict=None, page_dict={'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}) |
| 592 |
| 593 |
| 594 |
| 595 def get_view_for_page(user_dict, page_dict): |
| 596 return pageConstruct(user_dict, page_dict).get_view_for_page() |
| global pageConstruct = <class utils.page_view_construct.pageConstruct>, user_dict = None, page_dict = {'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}, ).get_view_for_page undefined |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in __init__(self=<utils.page_view_construct.pageConstruct instance>, user_dict=None, page_dict={'added_keys': {}, 'admins': ['ryan@ensomniac.com'], 'created_by': 'ryan@ensomniac.com', 'created_on': datetime.datetime(2011, 6, 3, 19, 46, 59, 75366), 'notifications': ['2011-10-12-01-10-26-663775_1', '2012-01-11-10-12-10-428535_1', '2012-02-02-01-04-24-224523_1'], 'page_date': None, 'page_description': 'Welcome to Grouped', 'page_details': 'Help', 'page_domain': 'help', 'page_time': None, ...}) |
| 26 self.user_cache = {} |
| 27 |
| 28 self.all_tabs = self.get_all_tabs() |
| 29 |
| 30 self.clear_notifications() |
| self = <utils.page_view_construct.pageConstruct instance>, self.all_tabs undefined, self.get_all_tabs = <bound method pageConstruct.get_all_tabs of <utils.page_view_construct.pageConstruct instance>> |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in get_all_tabs(self=<utils.page_view_construct.pageConstruct instance>) |
| 36 def get_all_tabs(self): |
| 37 all_tabs = [] |
| 38 overview_tab, overview_content = self.get_overview() |
| 39 all_tabs.append((overview_tab, overview_content)) |
| 40 |
| overview_tab undefined, overview_content undefined, self = <utils.page_view_construct.pageConstruct instance>, self.get_overview = <bound method pageConstruct.get_overview of <utils.page_view_construct.pageConstruct instance>> |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in get_overview(self=<utils.page_view_construct.pageConstruct instance>) |
| 106 |
| 107 def get_overview(self): |
| 108 overview_content = self.get_overview_content() |
| 109 |
| 110 if "overview" in self.tabs_with_notifications: |
| overview_content undefined, self = <utils.page_view_construct.pageConstruct instance>, self.get_overview_content = <bound method pageConstruct.get_overview_content...tils.page_view_construct.pageConstruct instance>> |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in get_overview_content(self=<utils.page_view_construct.pageConstruct instance>) |
| 123 html = [] |
| 124 post_box = self.get_html_for_post_box() |
| 125 chats = self.get_all_chat_html() |
| 126 |
| 127 html.append(post_box) |
| chats undefined, self = <utils.page_view_construct.pageConstruct instance>, self.get_all_chat_html = <bound method pageConstruct.get_all_chat_html of <utils.page_view_construct.pageConstruct instance>> |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in get_all_chat_html(self=<utils.page_view_construct.pageConstruct instance>) |
| 169 boxes = [] |
| 170 for chat_name in days[date]["chat_data"]: |
| 171 chat_html_full, num_posts = self.get_html_for_full_post_box(chat_name) |
| 172 if not num_posts: continue |
| 173 |
| chat_html_full undefined, num_posts undefined, self = <utils.page_view_construct.pageConstruct instance>, self.get_html_for_full_post_box = <bound method pageConstruct.get_html_for_full_po...tils.page_view_construct.pageConstruct instance>>, chat_name = 'entreprise_dijonnaise_industrie_enrichissez_vos_informations_sur_europages' |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in get_html_for_full_post_box(self=<utils.page_view_construct.pageConstruct instance>, chat_name='entreprise_dijonnaise_industrie_enrichissez_vos_informations_sur_europages') |
| 386 else: is_first_message = False |
| 387 |
| 388 content_area_strip = self.get_html_for_post_box_container(chat_data_message_tuple, chat_name, message_date, user, message, is_first_message, user_data) |
| 389 |
| 390 if iteration == 1: |
| content_area_strip undefined, self = <utils.page_view_construct.pageConstruct instance>, self.get_html_for_post_box_container = <bound method pageConstruct.get_html_for_post_bo...tils.page_view_construct.pageConstruct instance>>, chat_data_message_tuple = (datetime.datetime(2012, 2, 2, 1, 4, 24, 220499), {'date': datetime.datetime(2012, 2, 2, 1, 4, 24, 220499), 'email_html': ({'text/html': [{'content_id': None, 'payload_raw': '<html>\n\t<head>\n\t\t<title></title>\n\t</head>\n\t<body...r="0" alt="" width="1" height="1"></body>\n</html>', 'payload_subtype': 'html'}]}, {'content_type': 'text/html', 'date': datetime.datetime(2012, 2, 2, 1, 4, 23), 'from_email': 'email@europages-nmp.cccampaigns.net', 'from_name': 'Service client EUROPAGES', 'subject': 'ENTREPRISE DIJONNAISE INDUSTRIE : enrichissez vos informations sur\n EUROPAGES', 'to': 'help@grouped.com'}), 'id': '2012_02_02__01_04_24_220394_email_europages_nmp_cccampaigns_net', 'message': 'A l\'attention de ENTREPRISE DIJONNAISE INDUSTRIE...Cl-mQxfZ8SA9MOPe_IPnGHxKbrtv3AjtS5lHnMjuKOA.gif">', 'user': 'email@europages-nmp.cccampaigns.net'}), chat_name = 'entreprise_dijonnaise_industrie_enrichissez_vos_informations_sur_europages', message_date = datetime.datetime(2012, 2, 2, 1, 4, 24, 220499), user = 'email@europages-nmp.cccampaigns.net', message = 'A l\'attention de ENTREPRISE DIJONNAISE INDUSTRIE...Cl-mQxfZ8SA9MOPe_IPnGHxKbrtv3AjtS5lHnMjuKOA.gif">', is_first_message = -1, user_data = {'email@europages-nmp.cccampaigns.net': None} |
| /home3/crawlste/public_html/cgi-bin/utils/page_view_construct.py in get_html_for_post_box_container(self=<utils.page_view_construct.pageConstruct instance>, chat_data_message_tuple=(datetime.datetime(2012, 2, 2, 1, 4, 24, 220499), {'date': datetime.datetime(2012, 2, 2, 1, 4, 24, 220499), 'email_html': ({'text/html': [{'content_id': None, 'payload_raw': '<html>\n\t<head>\n\t\t<title></title>\n\t</head>\n\t<body...r="0" alt="" width="1" height="1"></body>\n</html>', 'payload_subtype': 'html'}]}, {'content_type': 'text/html', 'date': datetime.datetime(2012, 2, 2, 1, 4, 23), 'from_email': 'email@europages-nmp.cccampaigns.net', 'from_name': 'Service client EUROPAGES', 'subject': 'ENTREPRISE DIJONNAISE INDUSTRIE : enrichissez vos informations sur\n EUROPAGES', 'to': 'help@grouped.com'}), 'id': '2012_02_02__01_04_24_220394_email_europages_nmp_cccampaigns_net', 'message': 'A l\'attention de ENTREPRISE DIJONNAISE INDUSTRIE...Cl-mQxfZ8SA9MOPe_IPnGHxKbrtv3AjtS5lHnMjuKOA.gif">', 'user': 'email@europages-nmp.cccampaigns.net'}), chat_name='entreprise_dijonnaise_industrie_enrichissez_vos_informations_sur_europages', message_date=datetime.datetime(2012, 2, 2, 1, 4, 24, 220499), user='email@europages-nmp.cccampaigns.net', message='A l\'attention de ENTREPRISE DIJONNAISE INDUSTRIE...Cl-mQxfZ8SA9MOPe_IPnGHxKbrtv3AjtS5lHnMjuKOA.gif">', is_first_message=-1, user_data={'email@europages-nmp.cccampaigns.net': None}) |
| 489 if chat_name in self.notification_data and message_id in self.notification_data[chat_name]: |
| 490 notification_locator = self.notification_data[chat_name][message_id] |
| 491 if not fs_db.notification_viewed(self.user_dict["email"], notification_locator): |
| 492 notification = '''<div style="position: absolute; left: 2px; top: 2px;"><img class="notification" src="http://www.grouped.com/shared_images/activity_index_0.png"></div>''' |
| 493 if "overview" not in self.tabs_with_notifications: self.tabs_with_notifications.append("overview") |
| global fs_db = <module 'utils.fs_db' from '/home3/crawlste/public_html/cgi-bin/utils/fs_db.pyc'>, fs_db.notification_viewed = <function notification_viewed>, self = <utils.page_view_construct.pageConstruct instance>, self.user_dict = None, notification_locator = '2012-02-02-01-04-24-224523_1' |
TypeError: unsubscriptable object
args =
('unsubscriptable object',)