<type 'exceptions.UnboundLocalError'> | Python 2.7.12: /usr/bin/python Sat Nov 9 10:49:29 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 = 'hanyang2023', project = 'hanyang', account = 'guest', pwd = 'guest', node = 'E2022-R3-04D ', NetworkLimit = 100 |
/home/sandbox/public_html/cgi-bin/Story01.py in displayData(database='hanyang2023', project='hanyang', account='guest', password='guest', node='E2022-R3-04D ', 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'Concept', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/concept2.png', 'id': u'\uc804\ud5a5\ucd95', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc804\ud5a5\ucd95', 'label': u'\uc804\ud5a5\ucd95(\u50b3\u9999\u795d)'}, {'class': u'Food', 'iconUrl': u'http://dh.aks.ac.kr/Encyves/Graph/icons/gourdbottle.png', 'id': u'\uc81c\uc0ac\uc220', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc81c\uc0ac\uc220', 'label': u'\uc81c\uc0ac\uc220(\u796d\u7940\uc220)'}, {'class': u'Actor', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/\uc778\ubb3c/\uc870\uc120\uc591\ubc18.png', 'id': u'\ud669\uc724\uc11d', 'infoUrl': u'https://encykorea.aks.ac.kr/Article/E0065262', 'label': u'\ud669\uc724\uc11d(\u9ec3\u80e4\u932b 1729~1791)'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04C', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04C', 'label': u'\ud76c\uc0dd\uacfc \uc81c\uae30\uc758 \uc810\uac80'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04D', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04D', 'label': u'\uc2e0\uad00\ub840 \ub54c \uc4f0\ub294 \ud5a5\uacfc \uc220'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04E', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04E', 'label': u'\uc9c4\ucc2c\uacfc \uada4\uc2dd'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/storyline.png', 'id': u'S2022-R3-04 ', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/S2022-R3-04', 'label': u'\uc885\ubb18\uc81c\ub840\uc758 \uc21c\uc11c'}], edgelist = [{'attribute': None, 'relation': u'isPreviousInSequenceTo', 'source': u'E2022-R3-04C', 'target': u'E2022-R3-04D'}, {'attribute': None, 'relation': u'isRelatedTo', 'source': u'E2022-R3-04D', 'target': u'\uc804\ud5a5\ucd95'}, {'attribute': None, 'relation': u'isRelatedTo', 'source': u'E2022-R3-04D', 'target': u'\uc81c\uc0ac\uc220'}, {'attribute': None, 'relation': u'isRelatedTo', 'source': u'E2022-R3-04D', 'target': u'\ud669\uc724\uc11d'}, {'attribute': None, 'relation': u'isPreviousInSequenceTo', 'source': u'E2022-R3-04D', 'target': u'E2022-R3-04E'}, {'attribute': u'\ud76c\uc0dd\uacfc \uc81c\uae30\uc758 \uc810\uac80', 'relation': u'hasPart', 'source': u'S2022-R3-04 ', 'target': u'E2022-R3-04C '}, {'attribute': u'\uc2e0\uad00\ub840 \ub54c \uc4f0\ub294 \ud5a5\uacfc \uc220', 'relation': u'hasPart', 'source': u'S2022-R3-04 ', 'target': u'E2022-R3-04D '}, {'attribute': u'\uc9c4\ucc2c\uacfc \uada4\uc2dd', 'relation': u'hasPart', 'source': u'S2022-R3-04 ', 'target': u'E2022-R3-04E '}], database = 'hanyang2023', project = 'hanyang', account = 'guest', password = 'guest', node = 'E2022-R3-04D ' |
/home/sandbox/public_html/cgi-bin/Story01.py in displayNetwork(nodelist=[{'class': u'Concept', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/concept2.png', 'id': u'\uc804\ud5a5\ucd95', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc804\ud5a5\ucd95', 'label': u'\uc804\ud5a5\ucd95(\u50b3\u9999\u795d)'}, {'class': u'Food', 'iconUrl': u'http://dh.aks.ac.kr/Encyves/Graph/icons/gourdbottle.png', 'id': u'\uc81c\uc0ac\uc220', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc81c\uc0ac\uc220', 'label': u'\uc81c\uc0ac\uc220(\u796d\u7940\uc220)'}, {'class': u'Actor', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/\uc778\ubb3c/\uc870\uc120\uc591\ubc18.png', 'id': u'\ud669\uc724\uc11d', 'infoUrl': u'https://encykorea.aks.ac.kr/Article/E0065262', 'label': u'\ud669\uc724\uc11d(\u9ec3\u80e4\u932b 1729~1791)'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04C', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04C', 'label': u'\ud76c\uc0dd\uacfc \uc81c\uae30\uc758 \uc810\uac80'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04D', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04D', 'label': u'\uc2e0\uad00\ub840 \ub54c \uc4f0\ub294 \ud5a5\uacfc \uc220'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04E', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04E', 'label': u'\uc9c4\ucc2c\uacfc \uada4\uc2dd'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/storyline.png', 'id': u'S2022-R3-04 ', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/S2022-R3-04', 'label': u'\uc885\ubb18\uc81c\ub840\uc758 \uc21c\uc11c'}], edgelist=[{'attribute': None, 'relation': u'isPreviousInSequenceTo', 'source': u'E2022-R3-04C', 'target': u'E2022-R3-04D'}, {'attribute': None, 'relation': u'isRelatedTo', 'source': u'E2022-R3-04D', 'target': u'\uc804\ud5a5\ucd95'}, {'attribute': None, 'relation': u'isRelatedTo', 'source': u'E2022-R3-04D', 'target': u'\uc81c\uc0ac\uc220'}, {'attribute': None, 'relation': u'isRelatedTo', 'source': u'E2022-R3-04D', 'target': u'\ud669\uc724\uc11d'}, {'attribute': None, 'relation': u'isPreviousInSequenceTo', 'source': u'E2022-R3-04D', 'target': u'E2022-R3-04E'}, {'attribute': u'\ud76c\uc0dd\uacfc \uc81c\uae30\uc758 \uc810\uac80', 'relation': u'hasPart', 'source': u'S2022-R3-04 ', 'target': u'E2022-R3-04C '}, {'attribute': u'\uc2e0\uad00\ub840 \ub54c \uc4f0\ub294 \ud5a5\uacfc \uc220', 'relation': u'hasPart', 'source': u'S2022-R3-04 ', 'target': u'E2022-R3-04D '}, {'attribute': u'\uc9c4\ucc2c\uacfc \uada4\uc2dd', 'relation': u'hasPart', 'source': u'S2022-R3-04 ', 'target': u'E2022-R3-04E '}], database='hanyang2023', project='hanyang', account='guest', password='guest', node='E2022-R3-04D ') |
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'Concept', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/concept2.png', 'id': u'\uc804\ud5a5\ucd95', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc804\ud5a5\ucd95', 'label': u'\uc804\ud5a5\ucd95(\u50b3\u9999\u795d)'}, {'class': u'Food', 'iconUrl': u'http://dh.aks.ac.kr/Encyves/Graph/icons/gourdbottle.png', 'id': u'\uc81c\uc0ac\uc220', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc81c\uc0ac\uc220', 'label': u'\uc81c\uc0ac\uc220(\u796d\u7940\uc220)'}, {'class': u'Actor', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/\uc778\ubb3c/\uc870\uc120\uc591\ubc18.png', 'id': u'\ud669\uc724\uc11d', 'infoUrl': u'https://encykorea.aks.ac.kr/Article/E0065262', 'label': u'\ud669\uc724\uc11d(\u9ec3\u80e4\u932b 1729~1791)'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04C', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04C', 'label': u'\ud76c\uc0dd\uacfc \uc81c\uae30\uc758 \uc810\uac80'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04D', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04D', 'label': u'\uc2e0\uad00\ub840 \ub54c \uc4f0\ub294 \ud5a5\uacfc \uc220'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04E', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04E', 'label': u'\uc9c4\ucc2c\uacfc \uada4\uc2dd'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/storyline.png', 'id': u'S2022-R3-04 ', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/S2022-R3-04', 'label': u'\uc885\ubb18\uc81c\ub840\uc758 \uc21c\uc11c'}], database = 'hanyang2023', project = 'hanyang', account = 'guest', password = 'guest', node = 'E2022-R3-04D ' |
/home/sandbox/public_html/cgi-bin/Story01.py in printNodes(nodelist=[{'class': u'Concept', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/concept2.png', 'id': u'\uc804\ud5a5\ucd95', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc804\ud5a5\ucd95', 'label': u'\uc804\ud5a5\ucd95(\u50b3\u9999\u795d)'}, {'class': u'Food', 'iconUrl': u'http://dh.aks.ac.kr/Encyves/Graph/icons/gourdbottle.png', 'id': u'\uc81c\uc0ac\uc220', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/\uc81c\uc0ac\uc220', 'label': u'\uc81c\uc0ac\uc220(\u796d\u7940\uc220)'}, {'class': u'Actor', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/\uc778\ubb3c/\uc870\uc120\uc591\ubc18.png', 'id': u'\ud669\uc724\uc11d', 'infoUrl': u'https://encykorea.aks.ac.kr/Article/E0065262', 'label': u'\ud669\uc724\uc11d(\u9ec3\u80e4\u932b 1729~1791)'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04C', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04C', 'label': u'\ud76c\uc0dd\uacfc \uc81c\uae30\uc758 \uc810\uac80'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04D', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04D', 'label': u'\uc2e0\uad00\ub840 \ub54c \uc4f0\ub294 \ud5a5\uacfc \uc220'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/episode.png', 'id': u'E2022-R3-04E', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/E2022-R3-04E', 'label': u'\uc9c4\ucc2c\uacfc \uada4\uc2dd'}, {'class': u'Story', 'iconUrl': u'http://dh.aks.ac.kr/hanyang2/icon/storyline.png', 'id': u'S2022-R3-04 ', 'infoUrl': u'https://dh.aks.ac.kr/hanyang2/wiki/index.php/S2022-R3-04', 'label': u'\uc885\ubb18\uc81c\ub840\uc758 \uc21c\uc11c'}], database='hanyang2023', project='hanyang', account='guest', password='guest', subject='E2022-R3-04D ') |
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"