List Info

Thread: syncdb problem: ValueError: list.remove(x): x not in list




syncdb problem: ValueError: list.remove(x): x not in list
user name
2007-12-18 16:58:29
I have django dev version 6941.

There seems to be a problem with manage.py line when I do
python
manage.py syncdb:
execute_manager(settings)

It creates the tables and but fails to populate initial
data.

#!/usr/bin/env python
from django.core.management import execute_manager
try:


# This is for Dos Prompt Start up
    import  settings
except ImportError:
    import sys
    sys.stderr.write("Error: Can't find the file
'settings.py' in the
directory containing %r. It appears you've customized
things.nYou'll
have to run django-admin.py, passing it your settings
module.n(If the
file settings.py does indeed exist, it's causing an
ImportError
somehow.)n" % __file__)
    sys.exit(1)

if __name__ == "__main__":
    execute_manager(settings)

[joelocalhost mysite]$ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 15, in ?
    execute_manager(settings)
  File
"/usr/lib/python2.4/site-packages/django/core/managemen
t/
__init__.py", line 272, in execute_manager
    utility.execute()
  File
"/usr/lib/python2.4/site-packages/django/core/managemen
t/
__init__.py", line 219, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/usr/lib/python2.4/site-packages/django/core/managemen
t/
base.py", line 72, in run_from_argv
    self.execute(*args, **options.__dict__)
  File
"/usr/lib/python2.4/site-packages/django/core/managemen
t/
base.py", line 86, in execute
    output = self.handle(*args, **options)
  File
"/usr/lib/python2.4/site-packages/django/core/managemen
t/
base.py", line 168, in handle
    return self.handle_noargs(**options)
  File
"/usr/lib/python2.4/site-packages/django/core/managemen
t/
commands/syncdb.py", line 95, in handle_noargs
    emit_post_sync_signal(created_models, verbosity,
interactive)
  File
"/usr/lib/python2.4/site-packages/django/core/managemen
t/
sql.py", line 489, in emit_post_sync_signal
    verbosity=verbosity, interactive=interactive)
  File
"/usr/lib/python2.4/site-packages/django/dispatch/
dispatcher.py", line 358, in send
    sender=sender,
  File
"/usr/lib/python2.4/site-packages/django/dispatch/
robustapply.py", line 47, in robustApply
    return receiver(*arguments, **named)
  File
"/usr/lib/python2.4/site-packages/django/contrib/conten
ttypes/
management.py", line 21, in update_contenttypes
    content_types.remove(ct)
ValueError: list.remove(x): x not in list

thanks,
joe
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: syncdb problem: ValueError: list.remove(x): x not in list
user name
2008-01-01 19:06:07
I have commented out this from settings.py,
#'django.contrib.contenttypes',

and syncdb and fixtures are working.

I am running python 2.4.3 on Fedora 6 and django svn
revision # 6980.

What impact commenting out contenttypes would have on django
project?


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


Re: syncdb problem: ValueError: list.remove(x): x not in list
user name
2008-01-01 19:41:43


On Jan 2, 2:06 pm, crybaby <joemystery...gmail.com> wrote:
> I have commented out this from settings.py,
> #'django.contrib.contenttypes',
>
> and syncdb and fixtures are working.
>
> I am running python 2.4.3 on Fedora 6 and django svn
revision # 6980.
>
> What impact commenting out contenttypes would have on
django project?

Sounds like a bug. Please open a ticket with as much
information as
possible:
http://code.dj
angoproject.com/timeline

(fill in the settings page [1] or register [2] to avoid the
spam
filter)

[1] http://code.dj
angoproject.com/settings
[2] http:
//www.djangoproject.com/accounts/register/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )