<type 'exceptions.UnboundLocalError'> | Python 2.7.12: /usr/bin/python Thu Aug 22 06:40:31 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/sandbox/public_html/cgi-bin/Story01.py in |
510 |
511 displayData( db, project, account, pwd, node, NetworkLimit ) |
512 |
513 |
=> 514 main() |
main = <function main> |
/home/sandbox/public_html/cgi-bin/Story01.py in main() |
509 if ( NetworkLimit < 1 ): NetworkLimit = 100 |
510 |
=> 511 displayData( db, project, account, pwd, node, NetworkLimit ) |
512 |
513 |
global displayData = <function displayData>, db = 'hanyang2021', project = 'hanyang', account = 'guest', pwd = 'guest', node = 'Fifty_Helps_for_the_beginner', NetworkLimit = 100 |
/home/sandbox/public_html/cgi-bin/Story01.py in displayData(database='hanyang2021', project='hanyang', account='guest', password='guest', node='Fifty_Helps_for_the_beginner', NetworkLimit=100) |
483 |
484 if( count <= NetworkLimit ): |
=> 485 displayNetwork( nodelist, edgelist, database, project, account, password, node ) |
486 else: |
487 displayList( nodelist, edgelist, database, project, account, password, node ) |
global displayNetwork = <function displayNetwork>, nodelist = [{'class': u'Actor', 'iconUrl': None, 'id': u'\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'label': u'\uc560\ub2c8 \ubca0\uc5b4\ub4dc(Annie L. A. Baird, 1864~1916)'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/bibIndex.png', 'id': u'bib-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'\ucc38\uace0\ubb38\ud5cc'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E0-301', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/E0-301', 'label': u'\uac1c\ud654\uae30 \uc11c\uc591\uc778\uc758 \ud55c\uad6d\uc5b4 \uad50\uc7ac'}, {'class': u'Record', 'iconUrl': None, 'id': u'Fifty_Helps_for_the_Beginner', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/Fifty_Helps_for_the_Beginner', 'label': u'Fifty Helps for the Beginner in the Use of the Korean Language'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/webResource.png', 'id': u'ref-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'WWW \ucc38\uc870 \uc790\uc6d0'}], edgelist = [{'attribute': None, 'relation': u'isRelatedTo', 'source': u'E0-301', 'target': u'Fifty_Helps_for_the_Beginner'}, {'attribute': None, 'relation': u'creator', 'source': u'Fifty_Helps_for_the_Beginner', 'target': u'\uc560\ub2c8_\ubca0\uc5b4\ub4dc'}, {'attribute': None, 'relation': u'bibliography', 'source': u'Fifty_Helps_for_the_Beginner', 'target': u'bib-Fifty_Helps_for_the_beginner'}, {'attribute': None, 'relation': u'onlineReference', 'source': u'Fifty_Helps_for_the_Beginner', 'target': u'ref-Fifty_Helps_for_the_beginner'}], database = 'hanyang2021', project = 'hanyang', account = 'guest', password = 'guest', node = 'Fifty_Helps_for_the_beginner' |
/home/sandbox/public_html/cgi-bin/Story01.py in displayNetwork(nodelist=[{'class': u'Actor', 'iconUrl': None, 'id': u'\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'label': u'\uc560\ub2c8 \ubca0\uc5b4\ub4dc(Annie L. A. Baird, 1864~1916)'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/bibIndex.png', 'id': u'bib-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'\ucc38\uace0\ubb38\ud5cc'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E0-301', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/E0-301', 'label': u'\uac1c\ud654\uae30 \uc11c\uc591\uc778\uc758 \ud55c\uad6d\uc5b4 \uad50\uc7ac'}, {'class': u'Record', 'iconUrl': None, 'id': u'Fifty_Helps_for_the_Beginner', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/Fifty_Helps_for_the_Beginner', 'label': u'Fifty Helps for the Beginner in the Use of the Korean Language'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/webResource.png', 'id': u'ref-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'WWW \ucc38\uc870 \uc790\uc6d0'}], edgelist=[{'attribute': None, 'relation': u'isRelatedTo', 'source': u'E0-301', 'target': u'Fifty_Helps_for_the_Beginner'}, {'attribute': None, 'relation': u'creator', 'source': u'Fifty_Helps_for_the_Beginner', 'target': u'\uc560\ub2c8_\ubca0\uc5b4\ub4dc'}, {'attribute': None, 'relation': u'bibliography', 'source': u'Fifty_Helps_for_the_Beginner', 'target': u'bib-Fifty_Helps_for_the_beginner'}, {'attribute': None, 'relation': u'onlineReference', 'source': u'Fifty_Helps_for_the_Beginner', 'target': u'ref-Fifty_Helps_for_the_beginner'}], database='hanyang2021', project='hanyang', account='guest', password='guest', node='Fifty_Helps_for_the_beginner') |
342 if not line: break |
343 if( '#YourData' == line.strip()): |
=> 344 printNodes( nodelist, database, project, account, password, node ) |
345 printLinks( edgelist, node, account ) |
346 else: |
global printNodes = <function printNodes>, nodelist = [{'class': u'Actor', 'iconUrl': None, 'id': u'\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'label': u'\uc560\ub2c8 \ubca0\uc5b4\ub4dc(Annie L. A. Baird, 1864~1916)'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/bibIndex.png', 'id': u'bib-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'\ucc38\uace0\ubb38\ud5cc'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E0-301', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/E0-301', 'label': u'\uac1c\ud654\uae30 \uc11c\uc591\uc778\uc758 \ud55c\uad6d\uc5b4 \uad50\uc7ac'}, {'class': u'Record', 'iconUrl': None, 'id': u'Fifty_Helps_for_the_Beginner', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/Fifty_Helps_for_the_Beginner', 'label': u'Fifty Helps for the Beginner in the Use of the Korean Language'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/webResource.png', 'id': u'ref-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'WWW \ucc38\uc870 \uc790\uc6d0'}], database = 'hanyang2021', project = 'hanyang', account = 'guest', password = 'guest', node = 'Fifty_Helps_for_the_beginner' |
/home/sandbox/public_html/cgi-bin/Story01.py in printNodes(nodelist=[{'class': u'Actor', 'iconUrl': None, 'id': u'\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc560\ub2c8_\ubca0\uc5b4\ub4dc', 'label': u'\uc560\ub2c8 \ubca0\uc5b4\ub4dc(Annie L. A. Baird, 1864~1916)'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/bibIndex.png', 'id': u'bib-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'\ucc38\uace0\ubb38\ud5cc'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E0-301', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/E0-301', 'label': u'\uac1c\ud654\uae30 \uc11c\uc591\uc778\uc758 \ud55c\uad6d\uc5b4 \uad50\uc7ac'}, {'class': u'Record', 'iconUrl': None, 'id': u'Fifty_Helps_for_the_Beginner', 'infoUrl': u'http://dh.aks.ac.kr/hanyang2/wiki/index.php/Fifty_Helps_for_the_Beginner', 'label': u'Fifty Helps for the Beginner in the Use of the Korean Language'}, {'class': u'Reference', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/webResource.png', 'id': u'ref-Fifty_Helps_for_the_beginner', 'infoUrl': None, 'label': u'WWW \ucc38\uc870 \uc790\uc6d0'}], database='hanyang2021', project='hanyang', account='guest', password='guest', subject='Fifty_Helps_for_the_beginner') |
225 |
226 #add show-all-story-nodes button |
=> 227 if( subjectClass == 'Story' ) : |
228 print " nodesArray.push({" |
229 print " id: 'switch1'," |
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"