Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frequencies: UnboundLocalError: local variable 'weights_attribute' referenced before assignment #1412

Closed
joverlee521 opened this issue Feb 13, 2024 · 2 comments · Fixed by #1413
Assignees
Labels
bug Something isn't working

Comments

@joverlee521
Copy link
Contributor

joverlee521 commented Feb 13, 2024

Error seen in private seasonal flu build.

[batch] [2024-02-13T14:17:13-08:00] Traceback (most recent call last):
[batch] [2024-02-13T14:17:13-08:00]   File "/nextstrain/augur/augur/__init__.py", line 66, in run
[batch] [2024-02-13T14:17:13-08:00]     return args.__command__.run(args)
[batch] [2024-02-13T14:17:13-08:00]   File "/nextstrain/augur/augur/frequencies.py", line 129, in run
[batch] [2024-02-13T14:17:13-08:00]     if weights_attribute:
[batch] [2024-02-13T14:17:13-08:00] UnboundLocalError: local variable 'weights_attribute' referenced before assignment
[batch] [2024-02-13T14:17:13-08:00] An error occurred (see above) that has not been properly handled by Augur.
[batch] [2024-02-13T14:17:13-08:00] To report this, please open a new issue including the original command and the error above:
[batch] [2024-02-13T14:17:13-08:00]     <https://github.com/nextstrain/augur/issues/new/choose>

Affected versions

Augur 24.2.0

Workaround

Use Augur <=24.1.0, or <=24.0.0 to avoid #1411. For users of Nextstrain's Docker runtime, NEXTSTRAIN_DOCKER_IMAGE=nextstrain/base:build-20240122T233533Z is the latest image that has Augur 24.0.0.

@joverlee521 joverlee521 added the bug Something isn't working label Feb 13, 2024
@victorlin victorlin self-assigned this Feb 13, 2024
@victorlin
Copy link
Member

victorlin commented Feb 13, 2024

This happens when --method diffusion is used with --tree. Will make a PR to fix.

@victorlin
Copy link
Member

victorlin commented Feb 13, 2024

Pyright (#1246) supposedly has the ability to catch these types of programming errors in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants