| <type 'exceptions.UnboundLocalError'> | Python 2.7.12: /usr/bin/python Sat Dec 6 10:05:39 2025 |
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\x86\xa1\xea\xb0\x95\xea\xb0\x80\xec\x82\xac\xec\x9d\x98_\xec\x97\xb0\xea\xb5\xac(2)' |
| /home/jisun/public_html/cgi-bin/Story01.py in displayNetwork(template='templateSov.htm', db='s_jisun', project='JD2', node='\xec\x86\xa1\xea\xb0\x95\xea\xb0\x80\xec\x82\xac\xec\x9d\x98_\xec\x97\xb0\xea\xb5\xac(2)') |
| 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\x86\xa1\xea\xb0\x95\xea\xb0\x80\xec\x82\xac\xec\x9d\x98_\xec\x97\xb0\xea\xb5\xac(2)' |
| /home/jisun/public_html/cgi-bin/Story01.py in displayData(database='s_jisun', project='JD2', node='\xec\x86\xa1\xea\xb0\x95\xea\xb0\x80\xec\x82\xac\xec\x9d\x98_\xec\x97\xb0\xea\xb5\xac(2)') |
| 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\uae30', 'label': u'\uc774\ubcd1\uae30', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc774\ubcd1\uae30'}, {'class': u'Volume', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Volume.png', 'id': u'\uc9c4\ub2e8\ud559\ubcf4_6', 'label': u'\uc9c4\ub2e8\ud559\ubcf4_6', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc9c4\ub2e8\ud559\ubcf4_6'}], database = 's_jisun', project = 'JD2', node = '\xec\x86\xa1\xea\xb0\x95\xea\xb0\x80\xec\x82\xac\xec\x9d\x98_\xec\x97\xb0\xea\xb5\xac(2)' |
| /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\uae30', 'label': u'\uc774\ubcd1\uae30', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc774\ubcd1\uae30'}, {'class': u'Volume', 'icon': u'http://dh.aks.ac.kr/~nkh/images/icon_Volume.png', 'id': u'\uc9c4\ub2e8\ud559\ubcf4_6', 'label': u'\uc9c4\ub2e8\ud559\ubcf4_6', 'url': u'http://dh.aks.ac.kr/~nkh/wiki/index.php/\uc9c4\ub2e8\ud559\ubcf4_6'}], database='s_jisun', project='JD2', subject='\xec\x86\xa1\xea\xb0\x95\xea\xb0\x80\xec\x82\xac\xec\x9d\x98_\xec\x97\xb0\xea\xb5\xac(2)') |
| 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"