argument of type 'int' is not iterable` #2358
Kontomoka5932
started this conversation in
General
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Should be fixed in the rolling build https://github.com/LostRuins/koboldcpp/releases/tag/rolling |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Symptoms:
A
TypeError: argument of type 'int' is not iterableoccurs immediately after a successful generation when the model outputs a plain integer (e.g., 123). This causes the API response to fail or return empty content...
{"role": "user", "content": "Выведи просто 123 без озвучки"},
...
Processing Prompt [BATCH] (1664 / 1664 tokens)
Generating (4 / 2048 tokens)
(EOS token triggered! ID:106)
[12:03:52] CtxLimit:2179/81920, Init:0.09s, Processed:1664 in 4.93s (337.73T/s),
Generated:4/2048 in 0.25s (15.81T/s), Total:5.27s
Output: 123
argument of type 'int' is not iterable
...
Probable Cause:
The error appears to stem from Python-based content normalization (likely during Anthropic/OpenAI format conversion or tool-call processing). The code expects
contentto be alistorstr, but anintis passed directly into an iteration loop (e.g.,for item in content:), causing the crash.Русское описание проблеммы
Протестировано на koboldcpp-1.117.1
Суть проблеммы:
Моя программа использует KoboldCPP и эмулируемую ей OpenAI API на адрессе "http://localhost:5001/v1/chat/completions".
Я использую ИИ модель "gemma-4-26B-A4B-it-uncensored-Q8_0".
Мой запрос к ИИ: Выведи просто 123 без озвучки
ИИ отвечает генерирует 123.
Ответ (копия текста из консоли KoboldCPP):
..
...
Как можно видеть в консоли, просто число вызвало ошибку "argument of type 'int' is not iterable".
Это ошибка не ИИ (она число выдала как нужно), это ошибка KoboldCPP который судя по всему ждёт строковые данные а получив число - ломается.
Ошибка случается сразу после того, как KoboldCPP получил от ИИ 123. Это значит, что Python-код берет этот результат и пытается выполнить над ним операцию итерации.
Beta Was this translation helpful? Give feedback.
All reactions