I am currently in the process of syncing my local copy of a Django app/
project (the website is structured as one giant app plugged into a
single project) with a development version that has undergone
significant changes since I last worked on it in summer 2009.  When I
attempt to view my copy of the site in my browser, I get the TypeError
"int() argument must be a string or a number, not 'tuple' ".

I am using Django 1.1.2 and Postgres w/ psycopg 2.2.2.  I have
upgraded these from prior versions and moved them around on my
computer a little, so it is possible that they are not all integrating
properly. Any ideas about what could be causing this error?

Thanks in advance for the help.  Here is the traceback:

Traceback (most recent call last):
  File "/Applications/django/trunk/django/core/servers/basehttp.py",
line 674, in __call__
    return self.application(environ, start_response)
  File "/Applications/django/trunk/django/core/handlers/wsgi.py", line
241, in __call__
    response = self.get_response(request)
  File "/Applications/django/trunk/django/core/handlers/base.py", line
141, in get_response
    return self.handle_uncaught_exception(request, resolver,
sys.exc_info())
  File "/Applications/django/trunk/django/core/handlers/base.py", line
165, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/Applications/django/trunk/django/core/handlers/base.py", line
91, in get_response
    request.path_info)
  File "/Applications/django/trunk/django/core/urlresolvers.py", line
249, in resolve
    for pattern in self.url_patterns:
  File "/Applications/django/trunk/django/core/urlresolvers.py", line
278, in _get_url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns",
self.urlconf_module)
  File "/Applications/django/trunk/django/core/urlresolvers.py", line
273, in _get_urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/Applications/django/trunk/django/utils/importlib.py", line
35, in import_module
    __import__(name)
  File "[project path]/urls.py", line 10, in <module>
    from community.views import *
  File "[app path]/views.py", line 35, in <module>
    from community.forms import *
  File "[app path]/forms.py", line 214, in <module>
    class UserProfileForm(ModelForm):
  File "[app path]/forms.py", line 218, in UserProfileForm
    communities = forms.ModelMultipleChoiceField(required=True,
queryset=Community.objects.all(), widget=TableCheckboxWidget)
  File "/Applications/django/trunk/django/db/models/manager.py", line
117, in all
    return self.get_query_set()
  File "[app path]/models.py", line 1219, in get_query_set
    return super(CommunityManager,
self).get_query_set().filter(pk__in=comms)
  File "/Applications/django/trunk/django/db/models/query.py", line
550, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "/Applications/django/trunk/django/db/models/query.py", line
568, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "/Applications/django/trunk/django/db/models/sql/query.py",
line 1128, in add_q
    can_reuse=used_aliases)
  File "/Applications/django/trunk/django/db/models/sql/query.py",
line 1071, in add_filter
    connector)
  File "/Applications/django/trunk/django/db/models/sql/where.py",
line 66, in add
    value = obj.prepare(lookup_type, value)
  File "/Applications/django/trunk/django/db/models/sql/where.py",
line 299, in prepare
    return self.field.get_prep_lookup(lookup_type, value)
  File "/Applications/django/trunk/django/db/models/fields/
related.py", line 136, in get_prep_lookup
    return [self._pk_trace(v, 'get_prep_lookup', lookup_type) for v in
value]
  File "/Applications/django/trunk/django/db/models/fields/
related.py", line 196, in _pk_trace
    v = getattr(field, prep_func)(lookup_type, v, **kwargs)
  File "/Applications/django/trunk/django/db/models/fields/
__init__.py", line 294, in get_prep_lookup
    return [self.get_prep_value(v) for v in value]
  File "/Applications/django/trunk/django/db/models/fields/
__init__.py", line 479, in get_prep_value
    return int(value)
TypeError: int() argument must be a string or a number, not 'tuple'

-- 
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 at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to