Skip to content
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

Closed
meulie opened this issue Apr 18, 2023 · 5 comments
Closed

I uploaded sonnet 18 by Shakespeare and broke it ;) #3

meulie opened this issue Apr 18, 2023 · 5 comments

Comments

@meulie
Copy link

meulie commented Apr 18, 2023

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

@vic-torr
Copy link

It didn't supported 188kb hamlet.txt
Failed Files:

hamlet.txt
Reason: Error getting embeddings: error, status code: 429, message: You exceeded your current quota, please check your plan and billing details.

@shellistic
Copy link

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

@bhargav794
Copy link

bhargav794 commented Apr 18, 2023

I got the same error

Error: 500 | PANIC: runtime error: index out of range [0] with length 0 goroutine 369569 [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({0x9456e0, 0xc0046343a8}) /usr/local/go/src/runtime/panic.go:838 +0x207 github.com/pashpashpash/vault/vault-web-server/postapi.UploadHandler({0x7fa4caf6e178?, 0xc00095c0f0}, 0xc0011bfe00) /home/nik/vault-ai/vault-web-server/postapi/fileupload.go:132 +0x147f net/http.HandlerFunc.ServeHTTP(0xc0011bfd00?, {0x7fa4caf6e178?, 0xc00095c0f0?}, 0xc0010a2958?) /usr/local/go/src/net/http/server.go:2084 +0x2f github.com/gorilla/mux.(*Router).ServeHTTP(0xc0001060c0, {0x7fa4caf6e178, 0xc00095c0f0}, 0xc0011bf900) /home/nik/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf github.com/codegangsta/negroni.Wrap.func1({0x7fa4caf6e178, 0xc00095c0f0}, 0x908660?, 0xc0024767c0) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:46 +0x4b github.com/codegangsta/negroni.HandlerFunc.ServeHTTP(0x0?, {0x7fa4caf6e178?, 0xc00095c0f0?}, 0x4c66a6?, 0xc0011cc280?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:29 +0x33 github.com/codegangsta/negroni.middleware.ServeHTTP({{0xa51a20?, 0xc0000a69d8?}, 0xc0000a6a20?}, {0x7fa4caf6e178, 0xc00095c0f0}, 0x4b7717?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6 github.com/codegangsta/negroni.(*Logger).ServeHTTP(0xc000183a70, {0x7fa4caf6e178?, 0xc00095c0f0}, 0xc0011bf900, 0xc0024767a0) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/logger.go:62 +0x92 github.com/codegangsta/negroni.middleware.ServeHTTP({{0xa50d20?, 0xc000183a70?}, 0xc0000a6a08?}, {0x7fa4caf6e178, 0xc00095c0f0}, 0x7fa4c9d483a0?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6 github.com/codegangsta/negroni.(*Recovery).ServeHTTP(0xc00004b000?, {0x7fa4caf6e178?, 0xc00095c0f0?}, 0xc0010a2c18?, 0xc0010a2c18?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/recovery.go:193 +0x86 github.com/codegangsta/negroni.middleware.ServeHTTP({{0xa50d60?, 0xc00008b400?}, 0xc0000a69f0?}, {0x7fa4caf6e178, 0xc00095c0f0}, 0xc00117ba68?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:38 +0xb6 github.com/codegangsta/negroni.(*Negroni).ServeHTTP(0xc000183a40, {0xa542e0?, 0xc00095c0e0}, 0xc00117ba68?) /home/nik/go/pkg/mod/github.com/codegangsta/negroni@v1.0.0/negroni.go:96 +0x125 net/http.serverHandler.ServeHTTP({0x652700?}, {0xa542e0, 0xc00095c0e0}, 0xc0011bf900) /usr/local/go/src/net/http/server.go:2916 +0x43b net/http.initALPNRequest.ServeHTTP({{0xa54b68?, 0xc000a64450?}, 0xc00117b880?, {0xc0000aa2a0?}}, {0xa542e0, 0xc00095c0e0}, 0xc0011bf900) /usr/local/go/src/net/http/server.go:3523 +0x245 net/http.(*http2serverConn).runHandler(0xa53b20?, 0xe41d48?, 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

@Aemon-Algiz
Copy link

Aemon-Algiz commented Apr 20, 2023

Ironically, it's failing on a print statement in fileupload.go on line 132. Removing the line fixes it.

@pashpashpash
Copy link
Owner

@meulie Fixed the issue here: 2bff175

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

No branches or pull requests

6 participants