#28376 closed Bug (invalid)
URIs not supported error
Reported by: | kamalpnayan | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
When i am following the django tutorial with django 1.11.2 and Python 3.6.1 i see the following error. I am using sqlite3 backend.
Performing system checks... System check identified no issues (0 silenced). Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x2b2b5f88b1e0> Traceback (most recent call last): File "/system/Django-1.11.2/django/db/backends/base/base.py", line 213, in ensure_connection self.connect() File "/system/Django-1.11.2/django/db/backends/base/base.py", line 189, in connect self.connection = self.get_new_connection(conn_params) File "/system/Django-1.11.2/django/db/backends/sqlite3/base.py", line 198, in get_new_connection conn = Database.connect(**conn_params) sqlite3.NotSupportedError: URIs not supported The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/system/Django-1.11.2/django/utils/autoreload.py", line 227, in wrapper fn(*args, **kwargs) File "/system/Django-1.11.2/django/core/management/commands/runserver.py", line 128, in inner_run self.check_migrations() File "/system/Django-1.11.2/django/core/management/base.py", line 422, in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) File "/system/Django-1.11.2/django/db/migrations/executor.py", line 20, in __init__ self.loader = MigrationLoader(self.connection) File "/system/Django-1.11.2/django/db/migrations/loader.py", line 52, in __init__ self.build_graph() File "/system/Django-1.11.2/django/db/migrations/loader.py", line 209, in build_graph self.applied_migrations = recorder.applied_migrations() File "/system/Django-1.11.2/django/db/migrations/recorder.py", line 65, in applied_migrations self.ensure_schema() File "/system/Django-1.11.2/django/db/migrations/recorder.py", line 52, in ensure_schema if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()): File "/system/Django-1.11.2/django/db/backends/base/base.py", line 254, in cursor return self._cursor() File "/system/Django-1.11.2/django/db/backends/base/base.py", line 229, in _cursor self.ensure_connection() File "/system/Django-1.11.2/django/db/backends/base/base.py", line 213, in ensure_connection self.connect() File "/system/Django-1.11.2/django/db/utils.py", line 94, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/system/Django-1.11.2/django/utils/six.py", line 685, in reraise raise value.with_traceback(tb) File "/system/Django-1.11.2/django/db/backends/base/base.py", line 213, in ensure_connection self.connect() File "/system/Django-1.11.2/django/db/backends/base/base.py", line 189, in connect self.connection = self.get_new_connection(conn_params) File "/system/Django-1.11.2/django/db/backends/sqlite3/base.py", line 198, in get_new_connection conn = Database.connect(**conn_params) django.db.utils.NotSupportedError: URIs not supported
Change History (2)
follow-up: 2 comment:1 by , 7 years ago
Description: | modified (diff) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 by , 5 years ago
Replying to Tim Graham:
Most likely this isn't a bug in Django. A past django-users thread suggests it's a Python issue. You're better off getting help there. Perhaps somehow an older versions of sqlite3 is being used? Did you tweak the
DATABASES
setting? For what it's worth, here are versions on my Python 3.5 install:
>>> import sqlite3 >>> sqlite3.version_info (2, 6, 0) >>> sqlite3.sqlite_version_info (3, 11, 0)
You got this problem because your python was compiled with sqlite < 3.5.0. Checking the versions won't help.
If you are using CentOS 6, don't use python34 from EPEL or rh-python36 from SCL. You can use python from miniconda3 as your base python interpreter. Here is my detailed analysis: https://github.com/WqyJh/django_sqlite3_checker/blob/master/python-sqlite3-django-versions.md
Most likely this isn't a bug in Django. A past django-users thread suggests it's a Python issue. You're better off getting help there. Perhaps somehow an older versions of sqlite3 is being used? Did you tweak the
DATABASES
setting? For what it's worth, here are versions on my Python 3.5 install: