A
A
Andrey Prokopyuk2014-03-12 14:01:59
Django
Andrey Prokopyuk, 2014-03-12 14:01:59

Django admin: how to fix save error: msg() takes exactly 3 arguments (4 given)?

When trying to save any record of any model in Django Admin, I get the error "TypeError: msg() takes exactly 3 arguments (4 given)".
Django runs on Windows, Python 2.7, with the following package versions:

Django==1.6.2
Pillow==2.3.0
South==0.8.4
django-admin-tools==0.5.1
django-jquery==1.9.1
django-tinymce==1.5.2
django-tinymcewrapper==0.4.2
mysql-python==1.2.5
pytils==0.3

At the same time, in production, where Debian 6, Python 2.6 and the same package versions, everything is in order.
Here is the listing of the error message:
Environment:


Request Method: POST
Request URL: http://localhost:8000/admin/auth/user/1/

Django Version: 1.6.2
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'jquery',
 'admin_tools',
 'admin_tools.theming',
 'admin_tools.menu',
 'admin_tools.dashboard',
 'django.contrib.admin',
 'jethelix',
 'fresh_app',
 'tinymce',
 'tinymcewrapper',
 'south',
 'pytils')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'fresh_app.middleware.FeedbackFormMiddleware')


Traceback:
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\core\handlers\base.py" in get_response
  114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\contrib\admin\options.py" in wrapper
  432.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\utils\decorators.py" in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\contrib\admin\sites.py" in inner
  198.             return view(request, *args, **kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\utils\decorators.py" in _wrapper
  29.             return bound_func(*args, **kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\utils\decorators.py" in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\utils\decorators.py" in bound_func
  25.                 return func(self, *args2, **kwargs2)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\db\transaction.py" in inner
  339.                 return func(*args, **kwargs)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\contrib\admin\options.py" in change_view
  1234.                 return self.response_change(request, new_object)
File "D:\VirtualEnv\AdFresh\lib\site-packages\django\contrib\admin\options.py" in response_change
  993.             self.message_user(request, msg, messages.SUCCESS)

Exception Type: TypeError at /admin/auth/user/1/
Exception Value: msg() takes exactly 3 arguments (4 given)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gasoid, 2014-09-08
@Gasoid

need python 2.7

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question