Answer the question
In order to leave comments, you need to log in
How to fix sqlite3 error in django?
Hello.
I have a django test project that starts and runs fine on Windows 7, but does not work on Linux Ubuntu Server.
The essence of the problem, when starting the django test server, an error occurs:
*****@ServerUbuntu:~/samba/share/Projects/test_site$ sqlite3 --version
3.34.0 2020-12-01 16:14:00 a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
*****@ServerUbuntu:~/samba/share/Projects/test_site$ python3.8
Python 3.8.6 (default, Dec 12 2020 08:29:04)
[GCC 5.4.0 20160609] on linux
Type "help ", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.11.0'
Answer the question
In order to leave comments, you need to log in
In general, I solved the problem, installed Django version 3.0.
If there is an error when starting the project:
return database_name == ':memory:' or 'mode=memory' in database_name
TypeError: argument of type 'PosixPath' is not iterable
'NAME': str(BASE_DIR / 'db.sqlite3')
Something with django_date_extract ... In general, SQLite has a bit strange date-time processing, and in time zones it gets confused from version to version, and in formats ... I would look aside if the formation of date-time is specified in your project , when you "thrust" this date-time in a kind term in a DB. On home and commercial systems, the default formats can be different, and it is more reliable to do all conversions of strings like 2020-12-14 15:27:00.000 MSK to date-time not to get the database, but to do it on the Python side...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question