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: __str__ returned non-string (type NoneType) #957

Open
sentry-io bot opened this issue Mar 13, 2024 · 5 comments
Open

TypeError: __str__ returned non-string (type NoneType) #957

sentry-io bot opened this issue Mar 13, 2024 · 5 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Mar 13, 2024

Sentry Issue: DJANGO-GIRLS-WEBSITE-6G

TypeError: __str__ returned non-string (type NoneType)
(7 additional frame(s) were not displayed)
...
  File "django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "django/utils/decorators.py", line 130, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "django/contrib/admin/options.py", line 1540, in changeform_view
    return self._changeform_view(request, object_id, form_url, extra_context)
  File "django/contrib/admin/options.py", line 1590, in _changeform_view
    self.log_addition(request, new_object, change_message)
  File "django/contrib/admin/options.py", line 815, in log_addition
    object_repr=str(object),
@vanessa
Copy link
Contributor

vanessa commented Apr 30, 2024

This stack trace isn't giving us much to go on. It would be helpful to know which page caused this error, and what object it was attempting to access, among other details.

@marksweb do you have any context on this that could help us find the culprit? Thank you!

@marksweb
Copy link
Collaborator

@vanessa this is what I can get at the moment.

Screenshot_20240430_165914_Firefox.jpg

We could do with Anna getting some time to invite you to sentry

@vanessa
Copy link
Contributor

vanessa commented Apr 30, 2024

Thank you. That is helpful! I contacted Anna to ask that.

@kewtree1408
Copy link

Hey! I'm one of the organisers DjangoGirls in Amsterdam.
I noticed that I can't add Sponsors and Coaches to admin panel.

Could it be related to this issue?

Screenshot 2024-10-08 at 22 35 25

@marksweb
Copy link
Collaborator

marksweb commented Oct 9, 2024

@kewtree1408 yes, it looks like the string method for a sponsor is problematic. It tries to return a sponsor name, but it's an optional field so could well be that NoneType that sentry is talking about.

I also see that an application tries to return it's primary key but you could have an instance of an application which hasn't been saved to the database yet and therefore would not have a primary key.

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

3 participants