UnboundLocalError | Python 3.6.8: /usr/bin/python3 Mon May 12 22:57:04 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>() |
1709 pubmed=display_regular_ligand(pdbid,asym_id,lig3,ligIdx,title) |
1710 else: |
=> 1711 pubmed,uniprot=display_protein_receptor(pdbid,asym_id,title) |
1712 |
1713 uniprot_line='' |
pubmed = '', uniprot = '', display_protein_receptor = <function display_protein_receptor>, pdbid = '6l4u', asym_id = '15', title = 'Structure of photosystem I-light-harvesting supercomplex from a red-lineage diatom' |
/var/www/html/BioLiP/pdb.cgi in display_protein_receptor(pdbid='6l4u', asym_id='15', title='Structure of photosystem I-light-harvesting supercomplex from a red-lineage diatom') |
843 |
844 if go: |
=> 845 display_go(go,uniprot,pdbid,asym_id) |
846 return pubmed,uniprot |
847 |
global display_go = <function display_go>, go = '0009765,0016020', uniprot = '', pdbid = '6l4u', asym_id = '15' |
/var/www/html/BioLiP/pdb.cgi in display_go(go='0009765,0016020', uniprot='', pdbid='6l4u', asym_id='15') |
484 '''.replace("$namespace_link",namespace_link |
485 ).replace("$namespace",namespace |
=> 486 ).replace("$uniprot",u |
487 )) |
488 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>