Skip to content

Fix .load command failing with 'NoneType object not iterable'#249

Merged
amjith merged 1 commit intodbcli:mainfrom
daniel7an:fix/issue-248-load-nonetype
Feb 15, 2026
Merged

Fix .load command failing with 'NoneType object not iterable'#249
amjith merged 1 commit intodbcli:mainfrom
daniel7an:fix/issue-248-load-nonetype

Conversation

@daniel7an
Copy link
Contributor

Fix

The .load command's load_extension() function in dbcommands.py was missing a return statement. All special commands must return a list of (title, rows, headers, status) tuples, but load_extension() implicitly returned None, causing the caller to fail with 'NoneType' object is not iterable when iterating over the result.

Added the missing return [(None, None, None, "")] statement.

Fixes #248

The load_extension() function was missing a return statement. All special
commands must return a list of (title, rows, headers, status) tuples, but
load_extension() returned None implicitly, causing the caller to fail when
iterating over the result.

Fixes dbcli#248
@amjith
Copy link
Member

amjith commented Feb 15, 2026

It's failing some type checks. But I can fix that. Merging it to unblock.

Thank you!

@amjith amjith merged commit 4c3b2fe into dbcli:main Feb 15, 2026
6 of 8 checks passed
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.

.load fails with NoneType object not iterable

2 participants