Error during query: 'latin-1' codec can't encode character

Full error:

17-03-12 15:31:09 ERROR (Thread-9) [homeassistant.components.recorder] Error during query: 'latin-1' codec can't encode character '\u2013' in position 7: ordinal not in range(256)

Anybody know what this is? I think it has something to do with why some of my components don’t show any history. I have MySQL set up and ever since a re cent internet outage my HA hasn’t fully come back to me.

In your HA configuration, in the place where you define “db_url”, you need to add “?charset=utf8” to the end.

5 Likes

Just found this answer a few hours ago in that huge database post, forgot to update OP! Thank you though.