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.
Translate: RNA input passes validation, then fails with UnboundLocalError #7
Claude reports: Translate on the selection AUGGCCAUU shows the dialog Codon 'AUG' is invalid and then raises:
File ".../BioPythonUtils.py", line 327, in run
seqout.append(str(aa_seq))
UnboundLocalError: cannot access local variable 'aa_seq' where it is not associated with a value
validate_nt() accepts U (it unions the DNA and RNA letters, lines 486-487), but the sequence is built as Seq(nt_str, IUPAC.unambiguous_dna) (line 315), so translate() rejects AUG. After the except at line 323 the code carries on and uses aa_seq, which was never assigned. The FASTA branch (lines 278-283) has the same pattern.
Fix: translate RNA with IUPAC.unambiguous_rna (or replace U with T), and return / continue after the error dialog.
Tested on Sublime Text build 4215 (portable, Windows), plugin host Python 3.14, installed through the Package Control Install Package picker (BioPythonUtils 2017.12.18.15.00.45, which already contains the fixes for #3), then removed again. Line numbers are those of BioPythonUtils.py on master (de058c4).
Activity