reflect.Value.Convert: value of type reflect.Value cannot be converted to type series.Type
MilesLin opened this issue · 5 comments
I ran container by docker run -it -p 8888:8888 -v %CD%:/usr/share/notebooks gopherdata/gophernotes:latest-ds
.
The code below is that I tried to converting a column into a different type, it got an error.
I found that the go version in the container is go1.11.4.
However, I ran the same code on my local, it works.
computer info:
- Windows10
- go version: go1.13.4 windows/amd64
Is that any version problem?
If you check the travis.yml file, CI for Go 1.11 version is not there anymore. There's only 1.14, 1.13, 1.12, and it's been updated recently in February. However, The Dockerfile points to building Go 1.11. Maybe try redownloading this source and rewrite part of the Dockerfile to build from 1.13 and start again while this issue is resolved?
language: go
go:
- 1.14.x
- 1.13.x
- 1.12.x
- master
If you check the travis.yml file, CI for Go 1.11 version is not there anymore. There's only 1.14, 1.13, 1.12, and it's been updated recently in February. However, The Dockerfile points to building Go 1.11. Maybe try redownloading this source and rewrite part of the Dockerfile to build from 1.13 and start again while this issue is resolved?
language: go go: - 1.14.x - 1.13.x - 1.12.x - master
You won't have to rewrite the Dockerfile, it pulls the latest go package in the alpine repo
Lines 28 to 31 in d8cdc38
Since it was built an year ago, go 1.11 probably was the latest version at that time.
I digged into Dockerhub, and @oneoneonepig you are right the docker image was last pushed a year ago, while the latest Dockerfile source on this repo added support for 1.11 version. Looks like you'd have to try building this locally instead of using Docker @MilesLin.
I think that is the bug from github.com/kniren/gota
which is the package built-in in the container.
I created a sample to demonstrate this issue.
here is the code.
import(
"github.com/kniren/gota/dataframe"
"github.com/kniren/gota/series"
)
type TestSt struct {
Name string
Score int `dataframe:"Score,int"`
}
data := []TestSt{}
data = append(data, TestSt{
Name: "Miles",
Score: 21,
})
df := dataframe.LoadStructs(data)
result := series.New(df.Col("Score"), series.Float, "Score")
Yes, @MilesLin I agree with you that the bug is from github.com/kniren/gota
package. I came across the same problem with this package. But it works well when I changed to the github.com/go-gota/gota
package.
Maybe the docker image tagged by latest:ds
should change github.com/kniren/gota
to github.com/go-gota/gota
.