<type 'exceptions.UnboundLocalError'> | Python 2.7.12: /usr/bin/python Sun Nov 24 17:38:06 2024 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/jisun/public_html/cgi-bin/Story01.py in |
302 |
303 displayNetwork("templateSov.htm", db, project, node) |
304 #displayData( node ) |
305 |
=> 306 main() |
main = <function main> |
/home/jisun/public_html/cgi-bin/Story01.py in main() |
301 return |
302 |
=> 303 displayNetwork("templateSov.htm", db, project, node) |
304 #displayData( node ) |
305 |
global displayNetwork = <function displayNetwork>, db = 's_jisun', project = 'JD2', node = '\xec\x84\xb8\xec\xa2\x85\xec\xa1\xb0\xec\x9d\x98_\xea\xb5\xad\xeb\x8f\x84\xec\xa3\xbc\xec\x82\xb0\xeb\xac\xb8\xec\xa0\x9c' |
/home/jisun/public_html/cgi-bin/Story01.py in displayNetwork(template='templateSov.htm', db='s_jisun', project='JD2', node='\xec\x84\xb8\xec\xa2\x85\xec\xa1\xb0\xec\x9d\x98_\xea\xb5\xad\xeb\x8f\x84\xec\xa3\xbc\xec\x82\xb0\xeb\xac\xb8\xec\xa0\x9c') |
279 if not line: break |
280 if( '#YourData' == line.strip()): |
=> 281 displayData( db, project, node ) |
282 else: |
283 print line |
global displayData = <function displayData>, db = 's_jisun', project = 'JD2', node = '\xec\x84\xb8\xec\xa2\x85\xec\xa1\xb0\xec\x9d\x98_\xea\xb5\xad\xeb\x8f\x84\xec\xa3\xbc\xec\x82\xb0\xeb\xac\xb8\xec\xa0\x9c' |
/home/jisun/public_html/cgi-bin/Story01.py in displayData(database='s_jisun', project='JD2', node='\xec\x84\xb8\xec\xa2\x85\xec\xa1\xb0\xec\x9d\x98_\xea\xb5\xad\xeb\x8f\x84\xec\xa3\xbc\xec\x82\xb0\xeb\xac\xb8\xec\xa0\x9c') |
266 db.close() |
267 |
=> 268 printNodes( nodelist, database, project, node ) |
269 printLinks( edgelist, node ) |
270 |
global printNodes = <function printNodes>, nodelist = [{'class': u'Person', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Person.png', 'id': u'\uc774\ubcd1\ub3c4', 'label': u'\uc774\ubcd1\ub3c4', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc774\ubcd1\ub3c4'}, {'class': u'Volume', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Volume.png', 'id': u'\uc9c4\ub2e8\ud559\ubcf4_8', 'label': u'\uc9c4\ub2e8\ud559\ubcf4_8', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc9c4\ub2e8\ud559\ubcf4_8'}, {'class': u'Person', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Person.png', 'id': u'\ud64d\uc591\ud638', 'label': u'\ud64d\uc591\ud638', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\ud64d\uc591\ud638'}], database = 's_jisun', project = 'JD2', node = '\xec\x84\xb8\xec\xa2\x85\xec\xa1\xb0\xec\x9d\x98_\xea\xb5\xad\xeb\x8f\x84\xec\xa3\xbc\xec\x82\xb0\xeb\xac\xb8\xec\xa0\x9c' |
/home/jisun/public_html/cgi-bin/Story01.py in printNodes(nodelist=[{'class': u'Person', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Person.png', 'id': u'\uc774\ubcd1\ub3c4', 'label': u'\uc774\ubcd1\ub3c4', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc774\ubcd1\ub3c4'}, {'class': u'Volume', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Volume.png', 'id': u'\uc9c4\ub2e8\ud559\ubcf4_8', 'label': u'\uc9c4\ub2e8\ud559\ubcf4_8', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc9c4\ub2e8\ud559\ubcf4_8'}, {'class': u'Person', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Person.png', 'id': u'\ud64d\uc591\ud638', 'label': u'\ud64d\uc591\ud638', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\ud64d\uc591\ud638'}], database='s_jisun', project='JD2', subject='\xec\x84\xb8\xec\xa2\x85\xec\xa1\xb0\xec\x9d\x98_\xea\xb5\xad\xeb\x8f\x84\xec\xa3\xbc\xec\x82\xb0\xeb\xac\xb8\xec\xa0\x9c') |
68 print " nodesArray.push({\n" |
69 print " id: 'switch1',\n" |
=> 70 print " label: '{0} List',\n".format(subjectClass) |
71 print " url: '{0}?db={1}&project={2}&key={3}',\n".format(CategoryUrl, database, project, subjectClass) |
72 print " shape: 'triangle',\n" |
subjectClass undefined |
<type 'exceptions.UnboundLocalError'>: local variable 'subjectClass' referenced before assignment
args =
("local variable 'subjectClass' referenced before assignment",)
message =
"local variable 'subjectClass' referenced before assignment"