-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I uploaded sonnet 18 by Shakespeare and broke it ;) #3
Comments
It didn't supported 188kb hamlet.txt
|
Also received a similar error when I attempted to upload a PDF: Total chunks: 0
Total embeddings: 0
[negroni] PANIC: runtime error: index out of range [0] with length 0
goroutine 193 [running]:
github.com/codegangsta/negroni.(*Recovery).ServeHTTP.func1()
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/recovery.go:159 +0xc7
panic({0x157bde0, 0xc0002ea360})
/usr/local/Cellar/go/1.20.3/libexec/src/runtime/panic.go:884 +0x213
github.com/pashpashpash/vault/vault-web-server/postapi.UploadHandler({0x1fb35b8?, 0xc0002e6080}, 0xc000228500)
/Users/tony/.../repos/vault-ai/vault-web-server/postapi/fileupload.go:132 +0x14a5
net/http.HandlerFunc.ServeHTTP(0xc000228400?, {0x1fb35b8?, 0xc0002e6080?}, 0xc0003bd6c8?)
/usr/local/Cellar/go/1.20.3/libexec/src/net/http/server.go:2122 +0x2f
github.com/gorilla/mux.(*Router).ServeHTTP(0xc000238000, {0x1fb35b8, 0xc0002e6080}, 0xc000228300)
/Users/tony/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf
github.com/codegangsta/negroni.Wrap.func1({0x1fb35b8, 0xc0002e6080}, 0x153cc40?, 0xc000262240)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:46 +0x4b
github.com/codegangsta/negroni.HandlerFunc.ServeHTTP(0xc0003bd7c0?, {0x1fb35b8?, 0xc0002e6080?}, 0xc0003bd7d0?, 0x105309f?)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:29 +0x33
github.com/codegangsta/negroni.middleware.ServeHTTP({{0x1682b60?, 0xc0000a0930?}, 0xc0000a0978?}, {0x1fb35b8, 0xc0002e6080}, 0x10c3977?)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6
github.com/codegangsta/negroni.(*Logger).ServeHTTP(0xc000181b90, {0x1fb35b8?, 0xc0002e6080}, 0xc000228300, 0xc000262220)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/logger.go:62 +0x8f
github.com/codegangsta/negroni.middleware.ServeHTTP({{0x1681d20?, 0xc000181b90?}, 0xc0000a0960?}, {0x1fb35b8, 0xc0002e6080}, 0x153cc40?)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6
github.com/codegangsta/negroni.(*Recovery).ServeHTTP(0x8?, {0x1fb35b8?, 0xc0002e6080?}, 0x0?, 0xc0003bda50?)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/recovery.go:193 +0x86
github.com/codegangsta/negroni.middleware.ServeHTTP({{0x1681d60?, 0xc0000c5360?}, 0xc0000a0948?}, {0x1fb35b8, 0xc0002e6080}, 0x1065f16?)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6
github.com/codegangsta/negroni.(*Negroni).ServeHTTP(0xc000181b60, {0x1685800?, 0xc0002500e0}, 0x1334634?)
/Users/tony/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:96 +0x125
net/http.serverHandler.ServeHTTP({0x1684258?}, {0x1685800, 0xc0002500e0}, 0xc000228300)
/usr/local/Cellar/go/1.20.3/libexec/src/net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc00062a090, {0x1685f68, 0xc000236b10})
/usr/local/Cellar/go/1.20.3/libexec/src/net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.20.3/libexec/src/net/http/server.go:3089 +0x5ed |
I got the same error
|
Ironically, it's failing on a print statement in fileupload.go on line 132. Removing the line fixes it. |
I uploaded Shall I compare thee to a summer’s .txt
and got...
Error: 500 | PANIC: runtime error: index out of range [0] with length 0 goroutine 11080 [running]: github.com/codegangsta/negroni.(*Recovery).ServeHTTP.func1() /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/recovery.go:159 +0xc7 panic({0x9446c0, 0xc02a4fcca8}) /usr/local/go/src/runtime/panic.go:838 +0x207 github.com/pashpashpash/vault/vault-web-server/postapi.UploadHandler({0x7f9d49f90508?, 0xc0002030d0}, 0xc0139eb200) /home/nik/vault-ai/vault-web-server/postapi/fileupload.go:125 +0x12bf net/http.HandlerFunc.ServeHTTP(0xc0139eb100?, {0x7f9d49f90508?, 0xc0002030d0?}, 0x2190?) /usr/local/go/src/net/http/server.go:2084 +0x2f github.com/gorilla/mux.(*Router).ServeHTTP(0xc000298000, {0x7f9d49f90508, 0xc0002030d0}, 0xc0139eb000) /home/nik/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf github.com/codegangsta/negroni.Wrap.func1({0x7f9d49f90508, 0xc0002030d0}, 0x907640?, 0xc0003ce940) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:46 +0x4b github.com/codegangsta/negroni.HandlerFunc.ServeHTTP(0xab6?, {0x7f9d49f90508?, 0xc0002030d0?}, 0x4315?, 0x795b?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:29 +0x33 github.com/codegangsta/negroni.middleware.ServeHTTP({{0xa506c0?, 0xc00000e120?}, 0xc00000e168?}, {0x7f9d49f90508, 0xc0002030d0}, 0x4b7717?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6 github.com/codegangsta/negroni.(*Logger).ServeHTTP(0xc0000205a0, {0x7f9d49f90508?, 0xc0002030d0}, 0xc0139eb000, 0xc0003ce920) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/logger.go:62 +0x92 github.com/codegangsta/negroni.middleware.ServeHTTP({{0xa4f9c0?, 0xc0000205a0?}, 0xc00000e150?}, {0x7f9d49f90508, 0xc0002030d0}, 0x7f9d49f8cc18?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6 github.com/codegangsta/negroni.(*Recovery).ServeHTTP(0xc00004ac00?, {0x7f9d49f90508?, 0xc0002030d0?}, 0xc004c43c18?, 0xc004c43c18?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/recovery.go:193 +0x86 github.com/codegangsta/negroni.middleware.ServeHTTP({{0xa4fa00?, 0xc000290050?}, 0xc00000e138?}, {0x7f9d49f90508, 0xc0002030d0}, 0xc001743368?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6 github.com/codegangsta/negroni.(*Negroni).ServeHTTP(0xc000020570, {0xa52f80?, 0xc0002030c8}, 0xc001743368?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:96 +0x125 net/http.serverHandler.ServeHTTP({0x652700?}, {0xa52f80, 0xc0002030c8}, 0xc0139eb000) /usr/local/go/src/net/http/server.go:2916 +0x43b net/http.initALPNRequest.ServeHTTP({{0xa53808?, 0xc00724e4b0?}, 0xc001743180?, {0xc0000220e0?}}, {0xa52f80, 0xc0002030c8}, 0xc0139eb000) /usr/local/go/src/net/http/server.go:3523 +0x245 net/http.(*http2serverConn).runHandler(0xa527c0?, 0xe3fd48?, 0x0?, 0x0?) /usr/local/go/src/net/http/h2_bundle.go:5911 +0x78 created by net/http.(*http2serverConn).processHeaders /usr/local/go/src/net/http/h2_bundle.go:5641 +0x59b
The text was updated successfully, but these errors were encountered: