[GH-ISSUE #447] commit 8bbff2df98 stops "ollama ls" from working here #46719

Closed
opened 2026-04-27 23:41:21 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @xyproto on GitHub (Aug 31, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/447

Originally assigned to: @mxyng on GitHub.

go generate ./... && go build . && ./ollama ls worked fine for previous versions, but does not work for the latest commit.

Using git bisect, the commit that creates this problem seems to be 8bbff2df98 (from the 28th of Aug).

Here is the error message for when it is not working:

panic: runtime error: slice bounds out of range [:12] with length 0

goroutine 1 [running]:
github.com/jmorganca/ollama/cmd.ListHandler(0x140004a8200?, {0x1052159e0, 0x0, 0x104a71539?})
	/Users/username/clones/ollama/cmd/cmd.go:199 +0x4e8
github.com/spf13/cobra.(*Command).execute(0x1400045bb00, {0x1052159e0, 0x0, 0x0})
	/Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 +0x658
github.com/spf13/cobra.(*Command).ExecuteC(0x1400045a900)
	/Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:985
main.main()
	/Users/username/clones/ollama/main.go:11 +0x54
Originally created by @xyproto on GitHub (Aug 31, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/447 Originally assigned to: @mxyng on GitHub. `go generate ./... && go build . && ./ollama ls` worked fine for previous versions, but does not work for the latest commit. Using `git bisect`, the commit that creates this problem seems to be 8bbff2df986629e5481547e913ab4de0245afb37 (from the 28th of Aug). Here is the error message for when it is not working: ``` panic: runtime error: slice bounds out of range [:12] with length 0 goroutine 1 [running]: github.com/jmorganca/ollama/cmd.ListHandler(0x140004a8200?, {0x1052159e0, 0x0, 0x104a71539?}) /Users/username/clones/ollama/cmd/cmd.go:199 +0x4e8 github.com/spf13/cobra.(*Command).execute(0x1400045bb00, {0x1052159e0, 0x0, 0x0}) /Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 +0x658 github.com/spf13/cobra.(*Command).ExecuteC(0x1400045a900) /Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x320 github.com/spf13/cobra.(*Command).Execute(...) /Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992 github.com/spf13/cobra.(*Command).ExecuteContext(...) /Users/username/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:985 main.main() /Users/username/clones/ollama/main.go:11 +0x54 ```
GiteaMirror added the bug label 2026-04-27 23:41:21 -05:00
Author
Owner

@mxyng commented on GitHub (Aug 31, 2023):

@xyproto did you restart the server after building from source? ollama list on main looks for a field that was added in the commit you linked so if the server hasn't been updated, it will error.

<!-- gh-comment-id:1701096036 --> @mxyng commented on GitHub (Aug 31, 2023): @xyproto did you restart the server after building from source? `ollama list` on `main` looks for a field that was added in the commit you linked so if the server hasn't been updated, it will error.
Author
Owner

@xyproto commented on GitHub (Sep 4, 2023):

@mxyng Thanks for the reply. After restarting the server, the issue disappeared. 👍

<!-- gh-comment-id:1704834465 --> @xyproto commented on GitHub (Sep 4, 2023): @mxyng Thanks for the reply. After restarting the server, the issue disappeared. :+1:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#46719