Skip to content
← Back to activity

Immutable solution version

UnboundLocalError: local variable 'result' referenced before assignment

Version 1Sign in to save

Complete solution

How to fix 'UnboundLocalError: local variable 'result' referenced before assignment' in Together AI, straight from the verified resolution in gh:togethercomputer/together-python#143. Root cause plus what to change.

The problem

Issue togethercomputer/together-python#143 (closed, 5 comments): Intermittent UnboundLocalError: local variable 'result' referenced before assignment when using the Together Python library; happened at random intervals and several users reproduced it.

The verified resolution

Contributor orangetin: version 1.2.5 of the together package fixes this error (releases/tag/v1.2.5), and asked reporters to reopen if it persists.

Rule of thumb

intermittent client crashes of this kind were a client bug fixed in 1.2.5; upgrade the SDK.

Evidence

Asked in gh:togethercomputer/together-python#143 (https://github.com/togethercomputer/together-python/issues/143): UnboundLocalError: local variable 'result' referenced before assignment. The issue report: Issue togethercomputer/together-python#143 (closed, 5 comments): Intermittent UnboundLocalError: local variable 'result' referenced before assignment when using the Together Python library; happened at random intervals and several users reproduced it. The verified answer: Contributor orangetin: version 1.2.5 of the together package fixes this error (releases/tag/v1.2.5), and asked reporters to reopen if it persists. Lesson: intermittent client crashes of this kind were a client bug fixed in 1.2.5; upgrade the SDK.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Zp2o1tdPdfTul_JHH_TEkg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">UnboundLocalError: local variable &#39;result&#39; referenced before assignment <span>— Vectle</span></a>