alexdavid/sigma

SQL error on getting list of chats

Closed this issue · 8 comments

Hey, I'm testing this library out and consistently receive
2019/10/30 21:26:35 sql: Scan error on column index 1, name "display_name": converting NULL to string is unsupported
The relevant code is as follows:

cl, err := sigma.NewClient()
	if err != nil {
		log.Fatal(err)
	}
	defer cl.Close()

	_, err = cl.Chats()
	if err != nil {
		log.Fatal(err)
	}

Thanks for the bug report! Looking into it. What version of MacOS are you running?

I should be able to test on Catalina later today, I'll update you if there's any difference.
Testing with sigma-web, the binary runs fine but a page load on localhost:8080 simply does nothing. I can try on Mojave actually, in just a moment

Identical behaviour on Mojave.

Interesting, the error appears to be that you have NULL values for your display_name, but I can't seem to reproduce that on a clean HighSierra or Mojave install.

In any case, the columns are nullable, so I should have checked for that and this is indeed a bug.

I have pushed a fix that I think should work to master (85082d5), and I will update sigma-web to use the new version later today.

Thanks, I'll test this out!

It doesn't error any more, so this is progress!

Great, let me know if you run into any other issues