UnboundLocalError | Python 3.6.8: /usr/bin/python3 Wed May 7 22:44:47 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.
/var/www/html/BioLiP/pdb.cgi in <module>() |
1471 pubmed=display_regular_ligand(pdbid,asym_id,lig3,ligIdx,title) |
1472 else: |
=> 1473 pubmed,uniprot=display_protein_receptor(pdbid,asym_id,title) |
1474 |
1475 uniprot_line='' |
pubmed = '', uniprot = '', display_protein_receptor = <function display_protein_receptor>, pdbid = '8bd3', asym_id = '3', title = 'Structure of Chlorella ohadii Photosystem II Rev...otective Mechanisms against Environmental Stress.' |
/var/www/html/BioLiP/pdb.cgi in display_protein_receptor(pdbid='8bd3', asym_id='3', title='Structure of Chlorella ohadii Photosystem II Rev...otective Mechanisms against Environmental Stress.') |
840 |
841 if go: |
=> 842 display_go(go,uniprot,pdbid,asym_id) |
843 return pubmed,uniprot |
844 |
global display_go = <function display_go>, go = '0009765,0016020', uniprot = '', pdbid = '8bd3', asym_id = '3' |
/var/www/html/BioLiP/pdb.cgi in display_go(go='0009765,0016020', uniprot='', pdbid='8bd3', asym_id='3') |
481 '''.replace("$namespace_link",namespace_link |
482 ).replace("$namespace",namespace |
=> 483 ).replace("$uniprot",u |
484 )) |
485 for l,(term,name) in enumerate(go2aspect[Aspect]): |
u undefined |
UnboundLocalError: local variable 'u' referenced before assignment
args =
("local variable 'u' referenced before assignment",)
with_traceback =
<built-in method with_traceback of UnboundLocalError object>