[Dev-flock] new fixture error
Lucy R Mendel
lmendel at MIT.EDU
Tue Oct 9 20:58:27 EDT 2007
I think this is because the database is empty.
Dan, can you get the santa demo data committed (or buildable)?
Word!
On Tue, 9 Oct 2007, Mike Eggar wrote:
> I get a different error now...
>
>
> DoesNotExist at /Main/node/41/
> Node matching query does not exist.
> Request Method: GET
> Request URL: http://127.0.0.1:8000/Main/node/41/
> Exception Type: DoesNotExist
> Exception Value: Node matching query does not exist.
> Exception Location:
> C:\django\huginmunin\web\src\web_app\Main\views\views.py in node_centric,
> line 128
> Python Executable: C:\django\Python25\python.exe
> Python Version: 2.5.1
> Traceback (innermost last)
>
>
> * C:\django\huginmunin\web\src\web_app\Main\views\views.py in node_centric
> 121.
> 122. # convert to int else
> 123. nid = int(node_id)
> 124.
> 125. # select node; nid==0 means no node selected
> 126. if nid > 0:
> 127. node_selected = True
> 128. node = Node.objects.select_related(depth=2).get(id=nid) ...
> 129. # get all behaviors attached to node
> 130. dict['behaviors']=node.behaviors
> 131. # get parents and children
> 132. dict['parents']=node.parents#.select_related().filter()
> 133. dict['children']=node.children#.select_related().filter()
> 134. #dict['dimensions']=Dimension.objects.all()
> ▶ Local vars
>
>
> The output from sqlreset looks like this:
>
> BEGIN;
> DROP TABLE "db_tagging";
> DROP TABLE "db_dimension";
> DROP TABLE "db_tag";
> DROP TABLE "db_article";
> DROP TABLE "db_action";
> DROP TABLE "db_aggregaterating";
> DROP TABLE "db_behavior";
> DROP TABLE "db_state";
> DROP TABLE "db_edge";
> DROP TABLE "db_userextended";
> DROP TABLE "db_source";
> DROP TABLE "db_upc";
> DROP TABLE "db_argument";
> DROP TABLE "db_visit";
> DROP TABLE "db_citation";
> DROP TABLE "db_author";
> DROP TABLE "db_slug";
> DROP TABLE "db_rating";
> DROP TABLE "db_node";
> CREATE TABLE "db_node" (
> "id" integer NOT NULL PRIMARY KEY,
> "label" varchar(200) NOT NULL,
> "description" text NOT NULL,
> "url" varchar(200) NOT NULL,
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_rating" (
> "id" integer NOT NULL PRIMARY KEY,
> "score" integer NOT NULL,
> "item_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"),
> "item_id" integer unsigned NOT NULL
> )
> ;
> CREATE TABLE "db_slug" (
> "id" integer NOT NULL PRIMARY KEY,
> "slug" varchar(255) NOT NULL,
> "item_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"),
> "item_id" integer unsigned NOT NULL
> )
> ;
> CREATE TABLE "db_author" (
> "id" integer NOT NULL PRIMARY KEY,
> "name" varchar(255) NOT NULL,
> "description" text NOT NULL,
> "url" varchar(200) NOT NULL,
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_citation" (
> "id" integer NOT NULL PRIMARY KEY,
> "article_id" integer NOT NULL,
> "passage" varchar(255) NOT NULL,
> "argument_id" integer NOT NULL,
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_visit" (
> "id" integer NOT NULL PRIMARY KEY,
> "path" varchar(255) NOT NULL,
> "user_id" integer NOT NULL REFERENCES "auth_user" ("id"),
> "time" datetime NOT NULL,
> "duration" real NOT NULL,
> "sql_duration" real NOT NULL,
> "ip" char(15) NOT NULL,
> "remote_host" varchar(255) NOT NULL,
> "user_agent" varchar(255) NOT NULL,
> "referer" varchar(255) NOT NULL
> )
> ;
> CREATE TABLE "db_argument" (
> "id" integer NOT NULL PRIMARY KEY,
> "label" varchar(255) NOT NULL,
> "description" text NOT NULL,
> "sign" smallint NOT NULL,
> "behavior_id" integer NULL,
> "argument_id" integer NULL,
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_upc" (
> "id" integer NOT NULL PRIMARY KEY,
> "upc_code" varchar(255) NOT NULL,
> "upc_image" varchar(100) NULL,
> "node_id" integer NOT NULL REFERENCES "db_node" ("id"),
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_source" (
> "id" integer NOT NULL PRIMARY KEY,
> "name" varchar(255) NOT NULL,
> "description" text NOT NULL,
> "url" varchar(200) NOT NULL,
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_userextended" (
> "id" integer NOT NULL PRIMARY KEY,
> "user_id" integer NOT NULL UNIQUE REFERENCES "auth_user" ("id"),
> "name" varchar(255) NOT NULL,
> "level" integer NOT NULL,
> "feathers" real NOT NULL,
> "points" real NOT NULL,
> "status" real NOT NULL,
> "vote_weight" integer NULL,
> "eval_weight" integer NULL
> )
> ;
> CREATE TABLE "db_edge" (
> "id" integer NOT NULL PRIMARY KEY,
> "label" varchar(255) NOT NULL,
> "description" text NOT NULL,
> "url" varchar(200) NOT NULL,
> "src_id" integer NOT NULL REFERENCES "db_node" ("id"),
> "dest_id" integer NOT NULL REFERENCES "db_node" ("id"),
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_state" (
> "id" integer NOT NULL PRIMARY KEY,
> "label" varchar(255) NOT NULL,
> "text" varchar(255) NOT NULL
> )
> ;
> CREATE TABLE "db_behavior" (
> "id" integer NOT NULL PRIMARY KEY,
> "label" varchar(255) NOT NULL,
> "description" text NOT NULL,
> "url" varchar(200) NOT NULL,
> "dimension_id" integer NOT NULL,
> "node_id" integer NOT NULL REFERENCES "db_node" ("id"),
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_aggregaterating" (
> "id" integer NOT NULL PRIMARY KEY,
> "score" real NOT NULL,
> "time" datetime NOT NULL,
> "item_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"),
> "item_id" integer unsigned NOT NULL
> )
> ;
> CREATE TABLE "db_action" (
> "id" integer NOT NULL PRIMARY KEY,
> "type" integer unsigned NOT NULL,
> "label" varchar(255) NOT NULL,
> "description" text NOT NULL,
> "user_id" integer NOT NULL REFERENCES "auth_user" ("id"),
> "ip" char(15) NOT NULL,
> "time" datetime NOT NULL,
> "item_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"),
> "item_id" integer unsigned NOT NULL
> )
> ;
> CREATE TABLE "db_article" (
> "id" integer NOT NULL PRIMARY KEY,
> "title" varchar(255) NOT NULL,
> "url" varchar(200) NOT NULL,
> "source_id" integer NOT NULL REFERENCES "db_source" ("id"),
> "author_id" integer NOT NULL REFERENCES "db_author" ("id"),
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_tag" (
> "id" integer NOT NULL PRIMARY KEY,
> "tag" varchar(255) NOT NULL
> )
> ;
> CREATE TABLE "db_dimension" (
> "id" integer NOT NULL PRIMARY KEY,
> "label" varchar(255) NOT NULL,
> "description" text NOT NULL,
> "url" varchar(200) NOT NULL,
> "parent_id" integer NULL,
> "state" smallint UNSIGNED NOT NULL
> )
> ;
> CREATE TABLE "db_tagging" (
> "id" integer NOT NULL PRIMARY KEY,
> "tag_id" integer NOT NULL REFERENCES "db_tag" ("id"),
> "item_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"),
> "item_id" integer unsigned NOT NULL
> )
> ;
> CREATE INDEX "db_rating_item_type_id" ON "db_rating" ("item_type_id");
> CREATE INDEX "db_slug_slug" ON "db_slug" ("slug");
> CREATE INDEX "db_slug_item_type_id" ON "db_slug" ("item_type_id");
> CREATE INDEX "db_citation_article_id" ON "db_citation" ("article_id");
> CREATE INDEX "db_citation_argument_id" ON "db_citation" ("argument_id");
> CREATE INDEX "db_visit_user_id" ON "db_visit" ("user_id");
> CREATE INDEX "db_argument_behavior_id" ON "db_argument" ("behavior_id");
> CREATE INDEX "db_argument_argument_id" ON "db_argument" ("argument_id");
> CREATE INDEX "db_upc_node_id" ON "db_upc" ("node_id");
> CREATE INDEX "db_edge_src_id" ON "db_edge" ("src_id");
> CREATE INDEX "db_edge_dest_id" ON "db_edge" ("dest_id");
> CREATE INDEX "db_behavior_dimension_id" ON "db_behavior" ("dimension_id");
> CREATE INDEX "db_behavior_node_id" ON "db_behavior" ("node_id");
> CREATE INDEX "db_aggregaterating_item_type_id" ON "db_aggregaterating"
> ("item_type_id");
> CREATE INDEX "db_action_user_id" ON "db_action" ("user_id");
> CREATE INDEX "db_action_item_type_id" ON "db_action" ("item_type_id");
> CREATE INDEX "db_article_source_id" ON "db_article" ("source_id");
> CREATE INDEX "db_article_author_id" ON "db_article" ("author_id");
> CREATE INDEX "db_tag_tag" ON "db_tag" ("tag");
> CREATE INDEX "db_dimension_parent_id" ON "db_dimension" ("parent_id");
> CREATE INDEX "db_tagging_tag_id" ON "db_tagging" ("tag_id");
> CREATE INDEX "db_tagging_item_type_id" ON "db_tagging" ("item_type_id");
> COMMIT;
>
>
>
>
>
>
>>
>> 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 photos; more messages; more storageget 5GB with Windows Live Hotmail.
> http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507
>
>
More information about the Dev-flock
mailing list