#11143 closed (duplicate)
AttributeError: 'str' object has no attribute '_default_manager'
Reported by: | Camilo Nova | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi, since months ago i've getting sometimes this error:
Traceback (most recent call last): File "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/handlers/base.py", line 83, in get_response request.path_info) File "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py", line 186, in resolve sub_match = pattern.resolve(new_path) File "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py", line 184, in resolve for pattern in self.url_patterns: File "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py", line 208, in _get_url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py", line 203, in _get_urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/home/axiacore/webapps/atlantis/lib/python2.5/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/axiacore/webapps/atlantis/atlantis/local_apps/facturacion/urls.py", line 16, in <module> from atlantis.local_apps.facturacion.forms import PagoFacturaForm File "/home/axiacore/webapps/atlantis/atlantis/local_apps/facturacion/forms.py", line 5, in <module> class FacturaForm(forms.ModelForm): File "/home/axiacore/webapps/atlantis/lib/python2.5/django/forms/models.py", line 201, in __new__ opts.exclude, formfield_callback) File "/home/axiacore/webapps/atlantis/lib/python2.5/django/forms/models.py", line 165, in fields_for_model formfield = formfield_callback(f) File "/home/axiacore/webapps/atlantis/lib/python2.5/django/forms/models.py", line 183, in <lambda> lambda f: f.formfield()) File "/home/axiacore/webapps/atlantis/lib/python2.5/django/db/models/fields/related.py", line 727, in formfield 'queryset': self.rel.to._default_manager.complex_filter( AttributeError: 'str' object has no attribute '_default_manager'
I get this only when i have DEBUG=False, when i have DEBUG=True it never happens. Also, it no only happen to that model, appears in any model, i get a feeling in how to reproduce it:
- Put your app in apache wsgi (i have it in webfaction)
- Try to enter a url who points to a view that have @login_required (Here the normal behavior is to redirect the user to login page, but sometimes, does not redirect, instead email me the error message*)
- When redirected to login page, you login, and then works as normally
Maybe its something when validating if the user is logged in for first time, but i dont have any idea, this is like the 20 error message that i get, so i consider it important.
Attachments (1)
Change History (3)
by , 16 years ago
Attachment: | error_log.txt added |
---|
comment:1 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Looks like #10405. You should be able to fix it in your code by following the advice noted in this comment:
Error log mailed to me