You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 1, 2026. It is now read-only.
UnboundLocalError after an error dialog in Search, Taxon and Translate (FASTA) #13
Claude reports: several error paths run on after the except block and then use a variable that was never assigned, so the command ends with UnboundLocalError (and in some cases the user sees no message at all). Reproduced by making the Entrez call raise IOError for one run (a simulated network failure), and for Translate with an invalid codon:
Get Sequences by Search, line 70: ids after a failed Entrez.esearch (lines 61-68). No dialog is shown, only the traceback in the console.
Get Sequences by Taxon, line 222: links after a failed Entrez.elink (the dialog at line 219 is shown, then the traceback).
Get Sequences by Taxon, line 246: handle after a failed Entrez.efetch (dialog, then traceback).
Translate, FASTA branch, line 288: aa_seq after translate() fails (selection >x + ATG@CCGGG gives the dialog Codon '@CC' is invalid, then UnboundLocalError: cannot access local variable 'aa_seq'). The plain-text branch has the same problem (Translate: RNA input passes validation, then fails with UnboundLocalError #7).
Fix: return (or continue) after each error dialog, so nothing runs on with a missing value.
Tested on Sublime Text build 4215 (portable, Windows), plugin host Python 3.14, installed through Package Control (BioPythonUtils 2017.12.18.15.00.45, which contains the fixes for #3). Line numbers are those of BioPythonUtils.py on master (de058c4).
Activity