Opened 16 years ago

Closed 16 years ago

#8228 closed (fixed)

Failure to use manage.py syncdb after updating to revision 8301.

Reported by: guneeyoufix@… Owned by: nobody
Component: Uncategorized Version: dev
Severity: 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 Jacob)

Here is what I did to update my version of django:

I deleted the django directory from my site-packages directory.
I updated the source code from SVN using 'svn up' in the django trunk directory
I run the setup.py script with the install command

And after that, the python manage.py syncdb command doesn't work anymore.

Here us the trace of the error:

# ~/mysite $ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 11, in ?
    execute_manager(settings)
  File "/usr/lib/python2.3/site-packages/django/core/management/__init__.py", line 328, in execute_manager
    utility.execute()
  File "/usr/lib/python2.3/site-packages/django/core/management/__init__.py", line 290, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.3/site-packages/django/core/management/base.py", line 77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.3/site-packages/django/core/management/base.py", line 95, in execute
    self.validate()
  File "/usr/lib/python2.3/site-packages/django/core/management/base.py", line 122, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.3/site-packages/django/core/management/validation.py", line 22, in get_validation_errors
    from django.db import models, connection
  File "/usr/lib/python2.3/site-packages/django/db/__init__.py", line 16, in ?
    backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, [''])
  File "/usr/lib/python2.3/site-packages/django/db/backends/sqlite3/base.py", line 11, in ?
    from django.db.backends.sqlite3.creation import DatabaseCreation
  File "/usr/lib/python2.3/site-packages/django/db/backends/sqlite3/creation.py", line 4, in ?
    from django.db.backends.creation import BaseDatabaseCreation
  File "/usr/lib/python2.3/site-packages/django/db/backends/creation.py", line 11, in ?
    class BaseDatabaseCreation(object):
  File "/usr/lib/python2.3/site-packages/django/db/backends/creation.py", line 23, in BaseDatabaseCreation
    def sql_create_model(self, model, style, known_models=set()):
NameError: name 'set' is not defined

Is the error mine ?

Thanks

Change History (4)

comment:1 by Jacob, 16 years ago

Description: modified (diff)

(fixed formatting)

comment:2 by Jacob, 16 years ago

Resolution: fixed
Status: newclosed

(In [8303]) Fixed #8228: fixed a Python 2.3 compatibility from [8296].

comment:3 by guneeyoufix@…, 16 years ago

Resolution: fixed
Status: closedreopened

The problem seems to be fixed (and BTW: Wow! That was fast!), but another appeared. See the last line of the output below.

There also are a couple of other problems (see all but last line of the output below)

byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/measure.py to measure.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/measure.py", line 69
    @classmethod
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/maps/google/overlays.py to overlays.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/maps/google/overlays.py", line 120
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/maps/google/gmap.py to gmap.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/maps/google/gmap.py", line 110
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/geos/base.py to base.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/geos/base.py", line 105
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/geos/coordseq.py to coordseq.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/geos/coordseq.py", line 79
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/geos/libgeos.py to libgeos.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/geos/libgeos.py", line 123
    return dict((key, m.group(key)) for key in ('version', 'release_candidate', 'capi_version'))
                                      ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/geos/geometries.py to geometries.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/geos/geometries.py", line 191
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/geos/collections.py to collections.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/geos/collections.py", line 85
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/util.py to util.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/util.py", line 31
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/mysql/query.py to query.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/mysql/query.py", line 41
    MYSQL_GIS_TERMS = dict((term, None) for term in MYSQL_GIS_TERMS) # Making dictionary
                                          ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/postgis/query.py to query.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/postgis/query.py", line 221
    POSTGIS_TERMS = dict((term, None) for term in POSTGIS_TERMS) # Making a dictionary for fast lookups
                                        ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/postgis/models.py to models.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/postgis/models.py", line 28
    @classmethod
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/oracle/query.py to query.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/oracle/query.py", line 110
    ORACLE_SPATIAL_TERMS = dict((term, None) for term in ORACLE_SPATIAL_TERMS) # Making dictionary for fast lookups
                                               ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/oracle/models.py to models.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/db/backend/oracle/models.py", line 22
    @classmethod
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/db/models/fields/__init__.py to __init__.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/db/models/fields/__init__.py", line 57
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/tests/test_geos.py to test_geos.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/tests/test_geos.py", line 12
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/tests/distapp/tests.py to tests.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/tests/distapp/tests.py", line 161
    @no_oracle # Oracle already handles geographic distance calculation.
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/tests/relatedapp/tests.py to tests.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/tests/relatedapp/tests.py", line 35
    @no_mysql
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/tests/geoapp/tests.py to tests.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/tests/geoapp/tests.py", line 114
    @no_oracle # Oracle does not support KML.
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/tests/test_spatialrefsys.py to test_spatialrefsys.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/tests/test_spatialrefsys.py", line 30
    @no_mysql
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/utils/geoip.py to geoip.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/utils/geoip.py", line 49
    for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY')
      ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/utils/ogrinspect.py to ogrinspect.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/utils/ogrinspect.py", line 117
    return '\n'.join(s for s in _ogrinspect(*args, **kwargs))
                         ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/utils/layermapping.py to layermapping.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/utils/layermapping.py", line 396
    return dict((fld, kwargs[fld]) for fld in self.unique)
                                     ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/geomtype.py to geomtype.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/geomtype.py", line 61
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/field.py to field.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/field.py", line 67
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/driver.py to driver.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/driver.py", line 63
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/srs.py to srs.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/srs.py", line 188
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/envelope.py to envelope.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/envelope.py", line 92
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/datasource.py to datasource.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/datasource.py", line 125
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/geometries.py to geometries.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/geometries.py", line 171
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/layer.py to layer.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/layer.py", line 90
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/contrib/gis/gdal/feature.py to feature.pyc
  File "/usr/lib/python2.3/site-packages/django/contrib/gis/gdal/feature.py", line 68
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/django/db/backends/__init__.py to __init__.pyc
  File "/usr/lib/python2.3/site-packages/django/db/backends/__init__.py", line 9
    except NameError
                    ^
SyntaxError: invalid syntax

comment:4 by Jacob, 16 years ago

Resolution: fixed
Status: reopenedclosed

The last was an error in my last commit, which is now fixed. The other errors are something else, though, and I think they're not an error per-se but just something setup.py is doing because you're running 2.3.

Note: See TracTickets for help on using tickets.
Back to Top