Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError at /auth/login/google/: int() argument must be a string or a number, not Association #76

Closed
kdazzle opened this issue Nov 7, 2013 · 2 comments

Comments

@kdazzle
Copy link

kdazzle commented Nov 7, 2013

It's only started happening since 0.1.15, and it's kind of frustrating.
Django==1.5.5
python-openid==2.2.5
requests==2.0.1
oauthlib==0.6.0
requests-oauthlib==0.4.0
six==1.4.1

I'm not sure if there was a small bug in my code that got exacerbated by any changes in the latest release, but figured I'd post this anyways in case someone is seeing something similar.

Here is the traceback:
TypeError at /auth/login/google/

TypeError: int() argument must be a string or a number, not 'Association'

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "social/apps/django_app/utils.py", line 32, in wrapper
    return func(request, backend, *args, **kwargs)
  File "social/apps/django_app/views.py", line 16, in auth
    return do_auth(request.strategy, redirect_name=REDIRECT_FIELD_NAME)
  File "social/actions.py", line 25, in do_auth
    return strategy.start()
  File "social/strategies/base.py", line 56, in start
    if self.backend.uses_redirect():
  File "social/backends/open_id.py", line 215, in uses_redirect
    return self.openid_request().shouldSendRedirect()
  File "social/backends/open_id.py", line 221, in openid_request
    params))
  File "openid/consumer/consumer.py", line 353, in begin
    return self.beginWithoutDiscovery(service, anonymous)
  File "openid/consumer/consumer.py", line 376, in beginWithoutDiscovery
    auth_req = self.consumer.begin(service)
  File "openid/consumer/consumer.py", line 598, in begin
    assoc = self._getAssociation(service_endpoint)
  File "openid/consumer/consumer.py", line 1158, in _getAssociation
    assoc = self.store.getAssociation(endpoint.server_url)
  File "social/store.py", line 51, in getAssociation
    self.assoc.remove(expired)
  File "social/storage/django_orm.py", line 127, in remove
    cls.objects.filter(pk__in=ids_to_delete).delete()
  File "django/db/models/manager.py", line 155, in filter
    return self.get_query_set().filter(*args, **kwargs)
  File "django/db/models/query.py", line 669, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "django/db/models/query.py", line 687, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "django/db/models/sql/query.py", line 1271, in add_q
    can_reuse=used_aliases, force_having=force_having)
  File "django/db/models/sql/query.py", line 1202, in add_filter
    connector)
  File "django/db/models/sql/where.py", line 71, in add
    value = obj.prepare(lookup_type, value)
  File "django/db/models/sql/where.py", line 339, in prepare
    return self.field.get_prep_lookup(lookup_type, value)
  File "django/db/models/fields/__init__.py", line 324, in get_prep_lookup
    return [self.get_prep_value(v) for v in value]
  File "django/db/models/fields/__init__.py", line 555, in get_prep_value
    return int(value)
@omab omab closed this as completed in 8b58942 Nov 7, 2013
@omab
Copy link
Owner

omab commented Nov 7, 2013

@kdazzle, it was a bug introduced by 5fbdfe8

@kdazzle
Copy link
Author

kdazzle commented Nov 7, 2013

Oh, so simple! Thanks @omab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants