Yugoslavia

- Yugoslavia has been a member of the United Nations since 24 October 1945 –> –>
<type ‘exceptions.TypeError’> | Python 2.6.6: /usr/bin/python Tue Nov 27 14:38:29 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.
/data/vhost/www.undemocracy.com/docs/trunk.py in |
193 if __name__ == "__main__": |
194 pathpart = os.getenv("PATH_INFO") |
195 maintrunk(pathpart) |
196 |
197 |
maintrunk = <function maintrunk>, pathpart = ‘/Yugoslavia’ |
/data/vhost/www.undemocracy.com/docs/trunk.py in maintrunk(pathpart=’/Yugoslavia’) |
168 elif pagefunc == "nation": |
169 LogIncomingDB(pagefunc, hmap["nation"], referrer, ipaddress, useragent, remadeurl) |
170 WriteIndexStuffNation(hmap["nation"], "") |
171 elif pagefunc == "nationperson": |
172 LogIncomingDB(pagefunc, "%s/%s" % (hmap["nation"],hmap["person"]), referrer,ipaddress,useragent, remadeurl) |
global WriteIndexStuffNation = <function WriteIndexStuffNation>, hmap = {‘nation’: ‘Yugoslavia’, ‘pagefunc’: ‘nation’} |
/home/undemocracy/unparse-live/web2/nationpage.py in WriteIndexStuffNation(nation=’Yugoslavia’, person=”) |
218 WriteSpeechInstances(snation, person, nationdata) |
219 else: |
220 WriteNationHeading(nation, nationdata) |
221 WriteMinorityVotes(nation, nationdata) |
222 WriteAmbassadorList(nation, nationdata) |
global WriteNationHeading = <function WriteNationHeading>, nation = ‘Yugoslavia’, nationdata = [{‘continent’: ‘Unknown’, ‘enddate’: ‘2002-12-21’, ‘lntype’: ‘csvdata’, ‘missionurl’: ”, ‘startdate’: ‘1945-10-24’}, {‘date’: ‘2001-11-05’, ‘description’: ‘Operative paragraph 1 of draft resolution A/56/L.8.’, ‘division’: ’50/0/34/106′, ‘docid’: ‘A-56-PV.37’, ‘gid’: ‘pg026-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-12-24’, ‘description’: ‘Draft resolution I (resolution 56/232).’, ‘division’: ’77/20/20/73′, ‘docid’: ‘A-56-PV.92’, ‘gid’: ‘pg007-bk09’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘Draft resolution S, as a whole, (resolution 56/24 R).’, ‘division’: ‘103/41/17/29’, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg019-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘Draft resolution V was adopted, as a whole, by 1…es to 41, with 21 abstentions (resolution 57/79).’, ‘division’: ‘107/41/21/23’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg021-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘Draft resolution B, as orally amended, (resolution 57/59).’, ‘division’: ‘125/6/36/25’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg008-bk04’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘The draft decision (decision 57/515).’, ‘division’: ‘121/6/37/28’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg024-bk04’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘The draft resolution (resolution 56/16).’, ‘division’: ‘110/3/41/36’, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg005-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘Draft decision III.’, ‘division’: ‘115/7/37/31’, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg021-bk07’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘Draft resolution D (resolution 56/24 C).’, ‘division’: ’98/45/14/33′, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg010-bk04’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘Draft resolution A (resolution 57/58).’, ‘division’: ‘120/3/42/27’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg007-bk06’, ‘lntype’: ‘minorityvote’}, {‘docid’: ‘S-PV-4498’, ‘gid’: ‘pg006-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-03-27’}, {‘docid’: ‘S-PV-4498’, ‘gid’: ‘pg024-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-03-27’}, {‘docid’: ‘S-PV-4518’, ‘gid’: ‘pg005-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-04-24’}, {‘docid’: ‘S-PV-4518’, ‘gid’: ‘pg031-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-04-24’}, {‘docid’: ‘S-PV-4592’, ‘gid’: ‘pg005-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-07-30’}, {‘docid’: ‘S-PV-4592’, ‘gid’: ‘pg025-bk01’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-07-30’}, {‘docid’: ‘S-PV-4222’, ‘gid’: ‘pg011-bk03’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Mladenovi’, ‘sdate’: ‘2000-11-14’}, {‘docid’: ‘S-PV-4225’, ‘gid’: ‘pg023-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Mladenovi’, ‘sdate’: ‘2000-11-16’}, {‘docid’: ‘S-PV-4277’, ‘gid’: ‘pg021-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Mladenovi’, ‘sdate’: ‘2001-02-13’}, …] |
/home/undemocracy/unparse-live/web2/nationpage.py in WriteNationHeading(nation=’Yugoslavia’, nationdata=[{‘continent’: ‘Unknown’, ‘enddate’: ‘2002-12-21’, ‘lntype’: ‘csvdata’, ‘missionurl’: ”, ‘startdate’: ‘1945-10-24’}, {‘date’: ‘2001-11-05’, ‘description’: ‘Operative paragraph 1 of draft resolution A/56/L.8.’, ‘division’: ’50/0/34/106′, ‘docid’: ‘A-56-PV.37’, ‘gid’: ‘pg026-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-12-24’, ‘description’: ‘Draft resolution I (resolution 56/232).’, ‘division’: ’77/20/20/73′, ‘docid’: ‘A-56-PV.92’, ‘gid’: ‘pg007-bk09’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘Draft resolution S, as a whole, (resolution 56/24 R).’, ‘division’: ‘103/41/17/29’, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg019-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘Draft resolution V was adopted, as a whole, by 1…es to 41, with 21 abstentions (resolution 57/79).’, ‘division’: ‘107/41/21/23’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg021-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘Draft resolution B, as orally amended, (resolution 57/59).’, ‘division’: ‘125/6/36/25’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg008-bk04’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘The draft decision (decision 57/515).’, ‘division’: ‘121/6/37/28’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg024-bk04’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘The draft resolution (resolution 56/16).’, ‘division’: ‘110/3/41/36’, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg005-bk02’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘Draft decision III.’, ‘division’: ‘115/7/37/31’, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg021-bk07’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2001-11-29’, ‘description’: ‘Draft resolution D (resolution 56/24 C).’, ‘division’: ’98/45/14/33′, ‘docid’: ‘A-56-PV.68’, ‘gid’: ‘pg010-bk04’, ‘lntype’: ‘minorityvote’}, {‘date’: ‘2002-11-22’, ‘description’: ‘Draft resolution A (resolution 57/58).’, ‘division’: ‘120/3/42/27’, ‘docid’: ‘A-57-PV.57’, ‘gid’: ‘pg007-bk06’, ‘lntype’: ‘minorityvote’}, {‘docid’: ‘S-PV-4498’, ‘gid’: ‘pg006-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-03-27’}, {‘docid’: ‘S-PV-4498’, ‘gid’: ‘pg024-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-03-27’}, {‘docid’: ‘S-PV-4518’, ‘gid’: ‘pg005-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-04-24’}, {‘docid’: ‘S-PV-4518’, ‘gid’: ‘pg031-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-04-24’}, {‘docid’: ‘S-PV-4592’, ‘gid’: ‘pg005-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-07-30’}, {‘docid’: ‘S-PV-4592’, ‘gid’: ‘pg025-bk01’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Covi’, ‘sdate’: ‘2002-07-30’}, {‘docid’: ‘S-PV-4222’, ‘gid’: ‘pg011-bk03’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Mladenovi’, ‘sdate’: ‘2000-11-14’}, {‘docid’: ‘S-PV-4225’, ‘gid’: ‘pg023-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Mladenovi’, ‘sdate’: ‘2000-11-16’}, {‘docid’: ‘S-PV-4277’, ‘gid’: ‘pg021-bk02’, ‘lntype’: ‘ambassador’, ‘name’: ‘Mr. Mladenovi’, ‘sdate’: ‘2001-02-13’}, …]) |
74 print '<li>%s has been a member of the United Nations since <em>%s</em></li>' % (nation, LongDate(ns[1].isoformat())) |
75 if ns[2].year != 9999: |
76 print '<li>%s left or was renamed in <em>%s</em></li>' % (nation, LongDate(ns[2].isoformat)) |
77 if ns[4]: |
78 print '<li>Contact <a href="%s">the ambassador for %s</a></li>' % (ns[4], nation) |
nation = ‘Yugoslavia’, global LongDate = <function LongDate>, ns = (‘Yugoslavia’, datetime.date(1945, 10, 24), datetime.date(2002, 12, 21), ‘Unknown’, ”, ‘http://en.wikipedia.org/wiki/Yugoslavia’, ‘Yugoslavia’), ].isoformat undefined |
/home/undemocracy/unparse-live/web2/basicbits.py in LongDate(sdate=<built-in method isoformat of datetime.date object>) |
27 |
28 def LongDate(sdate): |
29 nmonth = int(sdate[5:7]) |
30 return "%d %s %s" % (int(sdate[8:]), monthnames[nmonth - 1], sdate[:4]) |
31 |
nmonth undefined, builtin int = <type ‘int’>, sdate = <built-in method isoformat of datetime.date object> |
<type 'exceptions.TypeError'>: %d format: a number is required, not str
args =
('%d format: a number is required, not str',)
message =
'%d format: a number is required, not str'