Having come across annoyances with ancient versions of python & sqlite libraries even on the latest Redhat Linux, I wonder (as a stab in the dark) if you might be experiencing the same on MacOS (if that's what you are testing).
Example - checking SQLite version on my PC.
Code:Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> sqlite3.sqlite_version '3.21.0'
Your minimum version for FK support is 3.6.19
I'm up to date with everything but I've narrowed it down to the shape of the SQL statement. If I use the old non-join syntax it seems to work as expected. Using the join syntax, however, gives the error. Both commands work if I use a SQLite Database Browser and execute the SQL therein. So, it's seems to be something to do with .Net. Really odd. But there's a workaround that doesn't show the error so I'm going to leave it at that for the moment.