Skip to content

Fix ValueError when selecting "Enter a different URL" in configure - #104

Merged
rohita5l merged 4 commits into
mainfrom
fix-workspace-prompt-string-unpack
May 27, 2026
Merged

Fix ValueError when selecting "Enter a different URL" in configure#104
rohita5l merged 4 commits into
mainfrom
fix-workspace-prompt-string-unpack

Conversation

@rohita5l

Copy link
Copy Markdown
Collaborator

The workspace picker assumed questionary.select(...).ask() returns either a (host, profile) tuple or None, but in some questionary versions selecting the "Enter a different URL" option returns the title string instead, causing too many values to unpack on the tuple destructure. Guard the unpack with isinstance(choice, tuple) so any non-tuple return (None or a stray string) falls through to the manual URL prompt.

Fix issue #103

The workspace picker assumed `questionary.select(...).ask()` returns
either a (host, profile) tuple or None, but in some questionary
versions selecting the "Enter a different URL" option returns the
title string instead, causing `too many values to unpack` on the
tuple destructure. Guard the unpack with `isinstance(choice, tuple)`
so any non-tuple return (None or a stray string) falls through to
the manual URL prompt.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@rohita5l
rohita5l requested a review from AarushiShah-db May 27, 2026 15:19
AarushiShah-db
AarushiShah-db previously approved these changes May 27, 2026
@rohita5l
rohita5l requested a review from AarushiShah-db May 27, 2026 17:50
@rohita5l
rohita5l merged commit 8d7389e into main May 27, 2026
2 checks passed
@rohita5l
rohita5l deleted the fix-workspace-prompt-string-unpack branch May 27, 2026 18:46
anthonyivn2 pushed a commit to anthonyivn2/ucode that referenced this pull request May 28, 2026
Resolves tests/test_ui.py — keeps both the layout-coverage tests added
on this branch and the return-type-defensiveness tests added on main
in PR databricks#104, since they exercise complementary aspects of
prompt_for_workspace.

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants