Python Forum
Error SQLite objects created in a thread can only be used in that same thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error SQLite objects created in a thread can only be used in that same thread.
#4
You're writing from a different thread, as the connection was created in.
You can use the consumer pattern or ignore that it's threaded:
consq = sqlite3.connect(sqdb, check_same_thread=False)
StackOverflow. https://stackoverflow.com/questions/3935...oncurrency

Before you use it, check if it's corrupting your data.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: Error SQLite objects created in a thread can only be used in that same thread. - by DeaD_EyE - Jan-31-2020, 11:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Thread deleted ChrisOfBristol 0 181 Apr-10-2024, 02:47 AM
Last Post: ChrisOfBristol
  Anyway to stop a thread and continue it? dimidgen 2 341 Mar-18-2024, 10:53 AM
Last Post: DeaD_EyE
  drawing a table with the status of tasks in each thread pyfoo 3 420 Mar-01-2024, 09:29 AM
Last Post: nerdyaks
  Error: can't start new thread maha2 0 1,459 Jun-13-2023, 12:26 PM
Last Post: maha2
  add svg to 2 thread program and display tabel in GUI Nietzsche 5 1,435 May-06-2023, 01:25 PM
Last Post: Nietzsche
  Thread Limits . . . JohnnyCoffee 10 1,683 Mar-03-2023, 04:07 AM
Last Post: jefsummers
  How to use Thread() ? Frankduc 7 2,050 May-17-2022, 04:51 PM
Last Post: Frankduc
  Help With Python SQLite Error Extra 10 15,069 May-04-2022, 11:42 PM
Last Post: Extra
  How to immediately kill and restart a thread while using a time.sleep() inside it? philipbergwerf 4 3,555 Feb-07-2022, 04:16 PM
Last Post: Gribouillis
  Process doesn't work but Thread work ! mr_byte31 4 2,641 Oct-18-2021, 06:29 PM
Last Post: mr_byte31

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020