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
oikb status crashes with TypeError: object of type 'NoneType' has no len() and oikb ls prints (empty) when pointed at a populated Knowledge Base on a current Open WebUI dev build (v0.11.0, image 2026-08-01). Sync itself works fine. The root cause is that newer Open WebUI no longer inlines the file list in GET /api/v1/knowledge/{id} (the web UI now fetches files from a paginated endpoint, GET /api/v1/knowledge/{id}/files?page=1), so the files field oikb reads comes back as null. This is very likely the same root cause as the validate --deep crash in #89 and the NoneType has no len() part of #53.
Open WebUI v0.11.0 (ghcr.io/open-webui/open-webui:dev, image built 2026-08-01, digest sha256:f3eef6c272f9...)
The affected Knowledge Base contains 408 files and syncs correctly (hourly diffs report 408 unchanged)
Steps to reproduce
Run Open WebUI :dev (v0.11.0 or the current dev image).
Sync any source into a Knowledge Base with oikb 0.4.0 (sync works; files land and link correctly).
Run oikb status --kb-id <kb id>.
Run oikb ls --kb-id <kb id>.
Expected
status reports the KB name and file count; ls lists the synced files.
Actual
$ oikb status --kb-id e1c8e711-...
Traceback (most recent call last):
...
File "/app/src/oikb/cli.py", line 770, in status
file_count = len(files)
^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
$ oikb ls --kb-id e1c8e711-...
(empty)
Both commands go through client.py::list_kb_files, which calls GET /knowledge/{kb_id} and reads the inline files field. On current dev that field is null for every KB (verified directly against the API: a KB with 408 linked files returns files: null, while the web UI populates its file list from GET /api/v1/knowledge/{id}/files?page=1&directory_id=).
Suggested fix
In list_kb_files, try the paginated GET /knowledge/{id}/files endpoint first and fall back to the legacy inline files field for older servers.
Summary
oikb statuscrashes withTypeError: object of type 'NoneType' has no len()andoikb lsprints(empty)when pointed at a populated Knowledge Base on a current Open WebUI dev build (v0.11.0, image 2026-08-01). Sync itself works fine. The root cause is that newer Open WebUI no longer inlines the file list inGET /api/v1/knowledge/{id}(the web UI now fetches files from a paginated endpoint,GET /api/v1/knowledge/{id}/files?page=1), so thefilesfield oikb reads comes back asnull. This is very likely the same root cause as thevalidate --deepcrash in #89 and theNoneType has no len()part of #53.Environment
ghcr.io/open-webui/oikb:latest), daemon mode, GitHub connectorghcr.io/open-webui/open-webui:dev, image built 2026-08-01, digestsha256:f3eef6c272f9...)408 unchanged)Steps to reproduce
:dev(v0.11.0 or the current dev image).oikb status --kb-id <kb id>.oikb ls --kb-id <kb id>.Expected
statusreports the KB name and file count;lslists the synced files.Actual
Both commands go through
client.py::list_kb_files, which callsGET /knowledge/{kb_id}and reads the inlinefilesfield. On current dev that field isnullfor every KB (verified directly against the API: a KB with 408 linked files returnsfiles: null, while the web UI populates its file list fromGET /api/v1/knowledge/{id}/files?page=1&directory_id=).Suggested fix
list_kb_files, try the paginatedGET /knowledge/{id}/filesendpoint first and fall back to the legacy inlinefilesfield for older servers.len(files)sites (cli.py:770instatus, and presumably the equivalent invalidate --deep, see oikb validate --deep fails with: object of type 'NoneType' has no len() #89) withfiles or []so an unexpectednulldegrades to "0 files" instead of a traceback.Additional context
validate --deepNoneType crash) and the crash half of SharePoint connector: validate --deep crashes with NoneType has no len(); sync reports 0 files for a non-empty library #53 (reported against the SharePoint connector, but the traceback is the samelen(files)onNone)./sync/*endpoints rather than the inlinefilesfield.:dev.This report was prepared with AI assistance; all observations were verified against the live instances described above.