The next complaint is
Error: creating label (2,0). Here we've made an indexing error. The coordinates are all 1-indexed while
range() is zero indexed. Since there are no zeros in the database, a new entry would have to be created. Because it is in read-only mode, this is an error. Change it to
range(1,7) (or use an explicit list) and the problem goes away. Two bugs found.