revision 462

0 views
Skip to first unread message

junk...@gmail.com

unread,
Aug 10, 2005, 3:27:21 AM8/10/05
to Django developers
breaks the createsuperuser and login for some reason. Weirdly it now
seems to be trying to do an insert during login (which fails as you
might expect).

461 works fine

mark

Adrian Holovaty

unread,
Aug 10, 2005, 11:30:58 AM8/10/05
to django-d...@googlegroups.com
It works for me on PostgreSQL and MySQL. What's your database setup?

Adrian

junk...@gmail.com

unread,
Aug 10, 2005, 12:04:27 PM8/10/05
to Django developers
postgreSQL (latest Gentoo - 8.0.3)

I dropped my database and set everything back up again as well.

cheers

mark

Adrian Holovaty

unread,
Aug 10, 2005, 12:25:44 PM8/10/05
to django-d...@googlegroups.com
> postgreSQL (latest Gentoo - 8.0.3)
>
> I dropped my database and set everything back up again as well.

Very strange...

Can you try running "tests/runtests.py" and telling us what output you get?

Adrian

junk...@gmail.com

unread,
Aug 11, 2005, 3:30:20 AM8/11/05
to Django developers
Here is the output:

Running tests with database 'postgresql'
Got 10 errors:

'basic' module: API test failed
===============================
Code: 'articles.get_list()'
Line: 30
Expected: '[<Article object>]\n'
Got: '[<Article object>, <Article object>]\n'

'basic' module: API test raised an exception
============================================
Code: "articles.get_object(headline__startswith='Area woman')"
Line: 37
Exception: File "/home/markw/dev/django_src/tests/doctest.py", line
1243, in __run
compileflags, 1) in test.globs
File "<doctest basic[11]>", line 1, in ?
articles.get_object(headline__startswith='Area woman')
File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1029, in function_get_object
assert len(obj_list) == 1, "get_object() returned more than one %s
-- it returned %s! Lookup parameters were %s" % (opts.object_name,
len(obj_list), kwargs)
AssertionError: get_object() returned more than one Article -- it
returned 2! Lookup parameters were {'headline__startswith': 'Area
woman'}


'basic' module: API test raised an exception
============================================
Code: 'articles.get_object(pub_date__year=2005)'
Line: 39
Exception: File "/home/markw/dev/django_src/tests/doctest.py", line
1243, in __run
compileflags, 1) in test.globs
File "<doctest basic[12]>", line 1, in ?
articles.get_object(pub_date__year=2005)
File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1029, in function_get_object
assert len(obj_list) == 1, "get_object() returned more than one %s
-- it returned %s! Lookup parameters were %s" % (opts.object_name,
len(obj_list), kwargs)
AssertionError: get_object() returned more than one Article -- it
returned 2! Lookup parameters were {'pub_date__year': 2005}


'basic' module: API test failed
===============================
Code: 'articles.get_object(id__exact=2)'
Line: 43
Expected: "Traceback (most recent call last):\n
...\nArticleDoesNotExist: Article does not exist for {'id__exact':
2}\n"
Got: '<Article object>\n'

'basic' module: API test failed
===============================
Code: 'a2.id'
Line: 64
Expected: '2L\n'
Got: '3L\n'

'basic' module: API test failed
===============================
Code: 'a3.id'
Line: 75
Expected: '3L\n'
Got: '4L\n'

'basic' module: API test failed
===============================
Code: 'a5.id'
Line: 98
Expected: '5L\n'
Got: '6L\n'

'custom_pk' module: API test raised an exception
================================================
Code: 'fran.save()'
Line: 23
Exception: File "/home/markw/dev/django_src/tests/doctest.py", line
1243, in __run
compileflags, 1) in test.globs
File "<doctest custom_pk[11]>", line 1, in ?
fran.save()
File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 747, in method_save
','.join(field_names), ','.join(placeholders)), db_values)
File "/usr/lib/python2.4/site-packages/django/core/db/base.py", line
10, in execute
result = self.cursor.execute(sql, params)
ProgrammingError: ERROR: duplicate key violates unique constraint
"custom_pk_employees_pkey"

INSERT INTO custom_pk_employees (employee_code,first_name,last_name)
VALUES ('XYZ456','Fran','Jones')


'custom_pk' module: API test raised an exception
================================================
Code: "employees.get_list(last_name__exact='Jones')"
Line: 24
Exception: File "/home/markw/dev/django_src/tests/doctest.py", line
1243, in __run
compileflags, 1) in test.globs
File "<doctest custom_pk[12]>", line 1, in ?
employees.get_list(last_name__exact='Jones')
File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1066, in function_get_list
return list(function_get_iterator(opts, klass, **kwargs))
File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1047, in function_get_iterator
cursor = db.db.cursor()
File
"/usr/lib/python2.4/site-packages/django/core/db/backends/postgresql.py",
line 31, in cursor
cursor.execute("SET TIME ZONE %s", [TIME_ZONE])
ProgrammingError: ERROR: current transaction is aborted, commands
ignored until end of transaction block

SET TIME ZONE 'America/Chicago'


'markup' module: Error while importing
======================================
File "tests/runtests.py", line 142, in run_tests
mod = __import__("othertests." + module, '', '', [''])
File "/home/markw/dev/django_src/tests/othertests/markup.py", line
37, in ?
assert rendered.strip() == """<p>Paragraph 1</p>
AssertionError

junk...@gmail.com

unread,
Aug 14, 2005, 2:55:12 AM8/14/05
to Django developers
Did you get anywhere with this - it still doesn't work and as far as I
can see I have a very straight forward setup.

Cheers

mark

Reply all
Reply to author
Forward
0 new messages