shield icon indicating copy to clipboard operation
shield copied to clipboard

index out of range shield.(*RedisStore).ClassWordCounts

Open thomasmodeneis opened this issue 8 years ago • 0 comments

Hi,

I'm getting this error quite often, any ideas on what may cause such behaviour ?

it seems to be caused after running shieldInstance.Classify(text)

panic: runtime error: index out of range

goroutine 90 [running]:
github.com/eaigner/shield.(*RedisStore).ClassWordCounts(0xc20806c000, 0xc20927a078, 0x2, 0xc20927e000, 0x2, 0x2, 0xc2092373b0, 0x0, 0x0)
    /opt/gocode/src/moody/Godeps/_workspace/src/github.com/eaigner/shield/redis.go:113 +0x85c
github.com/eaigner/shield.(*shield).Score(0xc20814d6c0, 0xc209fb0460, 0x1a, 0x0, 0x0, 0x0)
    /opt/gocode/src/moody/Godeps/_workspace/src/github.com/eaigner/shield/shield.go:92 +0x27e
github.com/eaigner/shield.(*shield).Classify(0xc20814d6c0, 0xc209fb0460, 0x1a, 0x0, 0x0, 0x0, 0x0)
    /opt/gocode/src/moody/Godeps/_workspace/src/github.com/eaigner/shield/shield.go:143 +0x7d

thomasmodeneis avatar Feb 22 '16 21:02 thomasmodeneis