[Dev-flock] new fixture error

Daniel Ring danring at MIT.EDU
Tue Oct 9 00:11:25 EDT 2007


Try "./manage.py reset db"
Django is unable to make some column changes to existing tables - I
haven't really figured out when or why this happens, but usually "reset
db" works.  If there's data in your database you want to keep, you can
save it with "./manage dumpdata db" or something like that.  (Just so
you know, 'db' means our app 'db', rather than databases in general -
resetting db should not reset 'auth', the user and permissions settings.)

If you still get errors, send me the output as well as the output to
"./manage.py sqlreset db".

Dan

Lucy R Mendel wrote:
> I get the same error when I runserver and try to get a page.
> 
> OperationalError
> no such column: db_node.state
> 
> /Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/backends/util.py
> in execute
> 
> 19#  return self.cursor.execute(sql, params)
> 
> 
> 
> On Mon, 8 Oct 2007, Lucy R Mendel wrote:
> 
>> $ ./manage.py syncdb
>> Creating table db_visit
>> Creating table db_state
>> Creating table db_aggregaterating
>> Traceback (most recent call last):
>>  File "./manage.py", line 11, in <module>
>>    execute_manager(settings)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/core/management/__init__.py",
>> line 264, in execute_manager
>>    utility.execute()
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/core/management/__init__.py",
>> line 215, in execute
>>    self.fetch_command(subcommand).run_from_argv(self.argv)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/core/management/base.py",
>> line 70, in run_from_argv
>>    self.execute(*args, **options.__dict__)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/core/management/base.py",
>> line 84, in execute
>>    output = self.handle(*args, **options)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/core/management/base.py",
>> line 168, in handle
>>    return self.handle_noargs(**options)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/core/management/commands/syncdb.py",
>> line 94, in handle_noargs
>>    emit_post_sync_signal(created_models, verbosity, interactive)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/core/management/sql.py",
>> line 457, in emit_post_sync_signal
>>    verbosity=verbosity, interactive=interactive)
>>  File
>> "/Users/lucy/Projects/Workspace/badbills/src/badcoopsite/django/dispatch/dispatcher.py",
>> line 360, in send
>>    **named
>>  File
>> "/Users/lucy/Projects/Workspace/badbills/src/badcoopsite/django/dispatch/robustapply.py",
>> line 47, in robustApply
>>    return receiver(*arguments, **named)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/contrib/contenttypes/management.py",
>> line 34, in update_contenttypes
>>    ct.delete()
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/models/base.py",
>> line 327, in delete
>>    self._collect_sub_objects(seen_objs)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/models/base.py",
>> line 319, in _collect_sub_objects
>>    for sub_obj in getattr(self, rel_opts_name).all():
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/models/query.py",
>> line 114, in __iter__
>>    return iter(self._get_data())
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/models/query.py",
>> line 482, in _get_data
>>    self._result_cache = list(self.iterator())
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/models/query.py",
>> line 189, in iterator
>>    cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") +
>> ",".join(select) + sql, params)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/backends/util.py",
>> line 19, in execute
>>    return self.cursor.execute(sql, params)
>>  File
>> "/Users/lucy/Projects/Workspace/ThoughtAndMemory/trunk/web/src/django/db/backends/sqlite3/base.py",
>> line 133, in execute
>>    return Database.Cursor.execute(self, query, params)
>> sqlite3.OperationalError: no such column: db_slug.slug
>>
>> On Mon, 8 Oct 2007, Mike Eggar wrote:
>>
>>>
>>> OK, I built the fixtures but now I get "no such column:
>>> db_node.state" error for prototype and main
>>>
>>>
>>>> From: Lucy R Mendel <lmendel at mit.edu>
>>>> To: Daniel Ring <danring at mit.edu>
>>>> CC: dev-flock at mit.edu
>>>> Subject: Re: [Dev-flock] New fixtures
>>>> Date: Mon, 8 Oct 2007 11:11:14 -0400 (EDT)
>>>>
>>>> to build you need ruby and a ruby json lib (debian packages: ruby;
>>>> libjson-ruby)
>>>>
>>>> Prototype on the web server should be up and running soon...
>>>>
>>>> On Mon, 8 Oct
>>>> 2007, Daniel Ring wrote:
>>>>
>>>> > ...can be built by running './build_fixtures.rb fixtures.json' in
>>>> > src/database/db/fixtures.  Beware, this takes a while.  If you don't
>>>> > have ruby or don't want to bother, download them from:
>>>> > http://danring.net/temp/fixtures.json  (~20meg)
>>>> >
>>>> > These are again just random-text fixtures.  I'll get the
>>>> > real-live-fake-Santa-fixtures out soon.
>>>> >
>>>> > Dan
>>>> > _______________________________________________
>>>> > Dev-flock mailing list
>>>> > Dev-flock at mit.edu
>>>> > http://mailman.mit.edu/mailman/listinfo/dev-flock
>>>> >
>>>> _______________________________________________
>>>> Dev-flock mailing list
>>>> Dev-flock at mit.edu
>>>> http://mailman.mit.edu/mailman/listinfo/dev-flock
>>>
>>> _________________________________________________________________
>>> i'm making a difference.�Make every IM count for the cause of your
>>> choice. Join Now. http://im.live.com/messenger/im/home/?source=TAGHM
>>>
>>
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dev-flock mailing list
> Dev-flock at mit.edu
> http://mailman.mit.edu/mailman/listinfo/dev-flock



More information about the Dev-flock mailing list