Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Aug. 8, 2006 14:32:20

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

manage.py syncdb error


if I apply syncdb for one of my apps

./manage.py syncdb xxapp

I get the traceback below that ends with

_mysql_exceptions.IntegrityError: (1062, "Duplicate entry
'17-add_status' for key 2")

I can't find an obvious error in the database.
does anyone know what could be wrong.?

abe




Traceback (most recent call last):
File "./manage.py", line 11, in ?
execute_manager(settings)
File "/usr/lib/python2.3/site-packages/django/core/management.py",
line 1226, in execute_manager
execute_from_command_line(action_mapping)
File "/usr/lib/python2.3/site-packages/django/core/management.py",
line 1152, in execute_from_command_line
action_mapping()
File "/usr/lib/python2.3/site-packages/django/core/management.py",
line 472, in syncdb
app=app, created_models=created_models)
File
"/usr/lib/python2.3/site-packages/django/dispatch/dispatcher.py", line
347, in send
sender=sender,
File
"/usr/lib/python2.3/site-packages/django/dispatch/robustapply.py", line
47, in robustApply
return receiver(*arguments, **named)
File
"/usr/lib/python2.3/site-packages/django/contrib/auth/management.py",
line 34, in create_permissions
p.save()
File "/usr/lib/python2.3/site-packages/django/db/models/base.py",
line 185, in save
','.join(placeholders)), db_values)
File "/usr/lib/python2.3/site-packages/django/db/backends/util.py",
line 12, in execute
return self.cursor.execute(sql, params)
File
"/usr/lib/python2.3/site-packages/django/db/backends/mysql/base.py",
line 31, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 137,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line
33, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry
'17-add_status' for key 2")


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group athttp://groups.google.com/group/django-users-~----------~----~----~----~------~----~------~--~---

Offline

#2 April 29, 2009 23:21:31

D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

manage.py syncdb error


Hi,

i followed django tutorial part 1 to learn django, however i met
following error when i used "python manage.py syncdb".

da...@django:~/mysite$ python manage.py syncdb
Creating table auth_permission
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/lib/python2.5/site-packages/django/core/management/
__init__.py", line 340, in execute_manager
utility.execute()
........

File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line
166, in execute
self.errorhandler(self, exc, value)
File "/var/lib/python-support/python2.5/MySQLdb/connections.py",
line 35, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1142, "CREATE command denied to
user 'david'@'localhost' for table 'auth_permission'")
da...@django:~/mysite$

anybody knows how to fix it?

thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en-~----------~----~----~----~------~----~------~--~---

Offline

#3 June 14, 2010 02:12:11

J.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

manage.py syncdb error


when I try to set up my database using the dummy it always gives me an
error saying:

django.core.exceptions.improperlyconfigured: you havent set the
database ENGINE setting yet.

I have followed the tutorial correctley and also left the ENGINE area
blank as the comment said in order to tel the syncdb action to start
the dummy database. It always gives me this error.

Please help me with thyis problem. I have downloaded postgreSQL but I
do not wish to go into that until I can use all aspects of django for
a real project. When I use postgreSQL i will call them and have them
help me, but for now can i please get help with using the dummy db.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 14th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support