-
Notifications
You must be signed in to change notification settings - Fork 348
Live server error with sqlite3 #783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This may be hard to reproduce |
Needs to be adjusted for Django 2.2+ I think, ref: django/django@76990cb. |
I wonder why you hit the (apparently wrong) |
See #793 for a fix. |
Yes switching to this branch fixed it for me |
I encountered this behavior in one of my projects. Interestingly, I have another project with same configs - and in that one live_server works. |
Looks like the commit hasn't been merged so this should still be open. |
I hit this problem today. Can I help get this sorted? |
As a workaround, simply set your database name to DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': "file::memory:",
},
} The problem came from for conn in connections.all():
# If using in-memory sqlite databases, pass the connections to
# the server thread.
if (
conn.settings_dict["ENGINE"] == "django.db.backends.sqlite3"
and conn.settings_dict["NAME"] == ":memory:"
):
# Explicitly enable thread-shareability for this connection
conn.allow_thread_sharing = True As Since Django 2.2, Hope one of the open pull request regarding this issue will be merged soon. |
When using the live_server in an integration test fixture:
the following error is generated:
The text was updated successfully, but these errors were encountered: