Changes between Version 1 and Version 2 of Ticket #23514


Ignore:
Timestamp:
Sep 18, 2014, 5:50:50 AM (10 years ago)
Author:
Mattia Procopio
Comment:

traceback added

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23514 – Description

    v1 v2  
    11Currently, `PostGISOperations` does query the database during its init time (to check the spatial version). This should be avoided if possible (see use case in #17656), and should be doable by transforming some variables into properties.
     2
     3
     4{{{
     5Traceback (most recent call last):
     6  File "manage.py", line 12, in <module>
     7    execute_from_command_line(sys.argv)
     8  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
     9    utility.execute()
     10  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
     11    django.setup()
     12  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
     13    apps.populate(settings.INSTALLED_APPS)
     14  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
     15    app_config.import_models(all_models)
     16  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/apps/config.py", line 197, in import_models
     17    self.models_module = import_module(models_module_name)
     18  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
     19    __import__(name)
     20  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/contrib/auth/models.py", line 40, in <module>
     21    class Permission(models.Model):
     22  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/models/base.py", line 125, in __new__
     23    new_class.add_to_class('_meta', Options(meta, **kwargs))
     24  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/models/base.py", line 300, in add_to_class
     25    value.contribute_to_class(cls, name)
     26  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/models/options.py", line 166, in contribute_to_class
     27    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
     28  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/__init__.py", line 40, in __getattr__
     29    return getattr(connections[DEFAULT_DB_ALIAS], item)
     30  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/utils.py", line 243, in __getitem__
     31    conn = backend.DatabaseWrapper(db, alias)
     32  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/base.py", line 14, in __init__
     33    self.ops = PostGISOperations(self)
     34  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 166, in __init__
     35    if self.spatial_version < (1, 3, 4):
     36  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/utils/functional.py", line 55, in __get__
     37    res = instance.__dict__[self.func.__name__] = self.func(instance)
     38  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 260, in spatial_version
     39    vtup = self.postgis_version_tuple()
     40  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 434, in postgis_version_tuple
     41    version = self.postgis_lib_version()
     42  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 414, in postgis_lib_version
     43    return self._get_postgis_func('postgis_lib_version')
     44  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 404, in _get_postgis_func
     45    with self.connection.temporary_connection() as cursor:
     46  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
     47    return self.gen.next()
     48  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/backends/__init__.py", line 543, in temporary_connection
     49    cursor = self.cursor()
     50  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/backends/__init__.py", line 165, in cursor
     51    cursor = self.make_debug_cursor(self._cursor())
     52  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/backends/__init__.py", line 138, in _cursor
     53    self.ensure_connection()
     54  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/backends/__init__.py", line 133, in ensure_connection
     55    self.connect()
     56  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
     57    six.reraise(dj_exc_type, dj_exc_value, traceback)
     58  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/backends/__init__.py", line 133, in ensure_connection
     59    self.connect()
     60  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/backends/__init__.py", line 122, in connect
     61    self.connection = self.get_new_connection(conn_params)
     62  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 134, in get_new_connection
     63    return Database.connect(**conn_params)
     64  File "/home/matt/repos/uwncom/lib/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
     65    conn = _connect(dsn, connection_factory=connection_factory, async=async)
     66django.db.utils.OperationalError: FATAL:  role "234124323" does not exist
     67}}}
Back to Top