File "/Users/softwareengineeringprasmul/Documents/VENVPYTH2/lib/python3.8/site-packages/django/core/management/base.py", line 336, in run_from_argv connections.close_all() File "/Users/softwareengineeringprasmul/Documents/VENVPYTH2/lib/python3.8/site-packages/django/db/utils.py", line 224, in close_all connection.close() File "/Users/softwareengineeringprasmul/Documents/VENVPYTH2/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 248, in close if not self.is_in_memory_db(): File "/Users/softwareengineeringprasmul/Documents/VENVPYTH2/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 367, in is_in_memory_db return self.creation.is_in_memory_db(self.settings_dict['NAME']) File "/Users/softwareengineeringprasmul/Documents/VENVPYTH2/lib/python3.8/site-packages/django/db/backends/sqlite3/creation.py", line 12, in is_in_memory_db return database_name == ':memory:' or 'mode=memory' in database_name TypeError: argument of type 'PosixPath' is not iterable
Solution :
remove current BASEDIR / in setting.py
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } }
into :
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db.sqlite3', } }