Tuesday, August 30, 2016

get_available_name() got an unexpected keyword argument 'max_length'

Hi,
   
   I've updated from django 1.8 to 1.10, and now when save a ImageFile I'm getting the next error:
  
   get_available_name() got an unexpected keyword argument 'max_length'

  
This is the end of the Traceback:
File "/home/dev/Documents/web/children/views/views.py" in post
  73.                     ob.avatar.save(t[0], t[1])     File "/home/securekids/Documents/enviroments/dev/local/lib/python2.7/site-packages/django/db/models/fields/files.py" in save    91.         self.name = self.storage.save(name, content, max_length=self.field.max_length)    File "/home/securekids/Documents/enviroments/dev/local/lib/python2.7/site-packages/django/core/files/storage.py" in save
53. name = self.get_available_name(name, max_length=max_length)

  I've tried to remove  "max_length=max_length", and then it's working fine, but I don't like so much to touch the django core :)
  
   Anyone can help me? 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3bc9d1f7-557e-4abf-9003-47aa7c6a415a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment