sfudeus / isg_exporter

Prometheus exporter for data from Stiebel Eltron Internet Service Gateway
Apache License 2.0
6 stars 1 forks source link

Can´t handle variables inclufing a comma in name #94

Closed svenoone closed 7 months ago

svenoone commented 7 months ago

Crash when language is English on a ISG v12.2.3 + WPE-I 12H 230 Premium

panic: runtime error: index out of range [1] with length 0

goroutine 13 [running]:
main.normalizeValue({0xc0002fa759, 0x3})
        /build/scraping.go:151 +0x25d
main.parsePage.func1(0x0?, 0xc0005cd710)
        /build/scraping.go:110 +0xe5
github.com/PuerkitoBio/goquery.(*Selection).Each(0xc0005cca80, 0xc0004d9d00)
        /go/pkg/mod/github.com/!puerkito!bio/goquery@v1.9.1/iteration.go:10 +0x62
main.parsePage({0xc44709?, 0x0?}, 0xc0004d9ec8)
        /build/scraping.go:95 +0x114
main.gatherScrapingData()
        /build/scraping.go:73 +0x19b
main.gatherData()
        /build/main.go:178 +0x10a
main.main.func1()
        /build/main.go:96 +0x13
created by main.main in goroutine 1
        /build/main.go:94 +0x111
panic: runtime error: index out of range [1] with length 0

image

STIEBEL ELTRON Reglersteuerung_files.zip

svenoone commented 7 months ago

German interface: image

sfudeus commented 7 months ago

thx for reporting, should be easy enough to fix.