Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8744 closed (duplicate)

__init__() got an unexpected keyword argument 'min_value'

Reported by: Bryan Veloso Owned by: Jacob
Component: Forms Version: dev
Severity: Keywords: admin, TypeError, 1.0-blocker
Cc: ville@…, carl@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I updated to [8373] and got this error. It went away when I commented out admin.autodiscover, but I'm sure it's not just that that's affected. Brian Rosner mentioned that it might have to do with some changes that Jacob had made earlier today. Here's my traceback.

Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response
  77.                     request.path_info)
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in resolve
  178.             for pattern in self.urlconf_module.urlpatterns:
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
  197.             self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
File "/var/www/projectrenova/../projectrenova/urls.py" in <module>
  11. admin.autodiscover()
File "/usr/lib/python2.5/site-packages/django/contrib/admin/__init__.py" in autodiscover
  40.         __import__("%s.admin" % app)
File "/var/www/projectrenova/applications/blog/admin.py" in <module>
  19. admin.site.register(Entry, EntryAdmin)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in register
  91.             validate(admin_class, model)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/validation.py" in validate
  25.     validate_base(cls, model)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/validation.py" in validate_base
  180.             check_formfield(cls, model, opts, "fieldsets[%d][1]['fields']" % idx, field)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/validation.py" in check_formfield
  261.         fields = fields_for_model(model)
File "/usr/lib/python2.5/site-packages/django/forms/models.py" in fields_for_model
  145.         formfield = formfield_callback(f)
File "/usr/lib/python2.5/site-packages/django/forms/models.py" in <lambda>
  124. def fields_for_model(model, fields=None, exclude=None, formfield_callback=lambda f: f.formfield()):
File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py" in formfield
  760.         return super(PositiveSmallIntegerField, self).formfield(**defaults)
File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py" in formfield
  678.         return super(IntegerField, self).formfield(**defaults)
File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py" in formfield
  318.         return form_class(**defaults)
File "/usr/lib/python2.5/site-packages/django/forms/fields.py" in __init__
  666.         super(TypedChoiceField, self).__init__(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/django/forms/fields.py" in __init__
  621.                                           help_text, *args, **kwargs)

Exception Type: TypeError at /
Exception Value: __init__() got an unexpected keyword argument 'min_value'

Attachments (1)

8744_r8786_temporary_fix.diff (523 bytes ) - added by Carl Meyer 16 years ago.
temporary fix for this error

Download all attachments as: .zip

Change History (10)

comment:1 by Ville Säävuori, 16 years ago

I have this same problem when trying to edit a model with PositiveIntegerField in admin. Using r8777.

comment:2 by Ville Säävuori, 16 years ago

Keywords: admin TypeError added

comment:3 by Ville Säävuori, 16 years ago

Cc: ville@… added

comment:4 by James Bennett, 16 years ago

This feels like a consequence of what's happening over in #6967.

comment:5 by Ville Säävuori, 16 years ago

Keywords: 1.0-blocker added
Triage Stage: UnreviewedAccepted

FWIW, some of the fields in my app do use choices with PositiveIntegerFields.

(And this is a 1.0-blocker, right?)

comment:6 by Carl Meyer, 16 years ago

Cc: carl@… added

comment:7 by Carl Meyer, 16 years ago

I ran into this error (also on a PositiveIntegerField with choices). I get the error on r8772, not on r8771; definitely the same deal as #6967. For anyone getting this error and not wanting to roll back to r8771, a temporary fix is in the attached patch. (As mattmcc mentions here, this is only a stopgap, not a real solution.)

by Carl Meyer, 16 years ago

temporary fix for this error

comment:8 by James Bennett, 16 years ago

Resolution: duplicate
Status: newclosed

Given that it's now (per comment above) been established that this is a consequence of #6967, which has been reopened, I'm closing this as a duplicate.

comment:9 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top