Relative Content

Tag Archive for pythonsqlite

Why does creating Sqlite connection in __init__ result in a pickling error?

I’m working on a personal project using SQLite and a whole lot of data. To speed it up, I want to do multiprocessing. What I’ve found when trying to implement this is that I get a pickling error if I have the sqlite connection created within the __init__, but it doesn’t happen when created outside of __init__. Why is this? Sample code showing the error below.