SQLite3 in Python 2.7 Rejecting Foreign Key Insert

Michael Torrie torriem at gmail.com
Sun Nov 23 05:58:47 CET 2014


On 11/22/2014 08:54 PM, llanitedave wrote:
Well that DID make a difference!  I used the %r marker, and the logger
line gave me back:
> "INFO:Related borehole_id is u'testbh3', of_borehole is 'testbh3'"
> 
> So it looks like I need to change my foreign key string to a unicode
> string.  I'll be working on that...

Or manually encode it to a UTF-8 byte string (just call .encode() on
it).  Sqlite probably only knows about UTF-8 when it comes to unicode.




More information about the Python-list mailing list