sqla_tutorial
sqla_tutorial copied to clipboard
Error in Debug-Mode of PyCharm
While Debugging 04_orm_basic in PyCharm i run into the following Error: sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 21280 and this is thread id 32808.
The Error is raised when using lazy load pattern in line 163
While not in Debugging, or having the first Breakpoint after the lazy load it works. Also in Visual Studio everything is fine, even in debugging.
For Some Reason PyCharm is changing the Thread at this point.
I wonder now if this is only in PyCharm in Debugging or can happen in a real-world scenario as well.
Thx in advance