'Session' object has no attribute 'max_redirects'

Django: 1.4
Python: 2.7.3

How could this happened ?
I didn't manually configure the Session object, nor edit the "max_redirects" attribute.
Got no clue……

```
Traceback:
File "/usr/local/sae/python/3rd/django-1.4/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/sae/python/3rd/django-1.4/django/contrib/admin/options.py" in wrapper
  366.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/usr/local/sae/python/3rd/django-1.4/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/usr/local/sae/python/3rd/django-1.4/django/views/decorators/cache.py" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File "/usr/local/sae/python/3rd/django-1.4/django/contrib/admin/sites.py" in inner
  196.             return view(request, *args, **kwargs)
File "/usr/local/sae/python/3rd/django-1.4/django/utils/decorators.py" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/usr/local/sae/python/3rd/django-1.4/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/usr/local/sae/python/3rd/django-1.4/django/utils/decorators.py" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/usr/local/sae/python/3rd/django-1.4/django/contrib/admin/options.py" in changelist_view
  1153.                 response = self.response_action(request, queryset=cl.get_query_set(request))
File "/usr/local/sae/python/3rd/django-1.4/django/contrib/admin/options.py" in response_action
  908.             response = func(self, request, queryset)
File "/data1/www/htdocs/749/codinglabs/2/autosigner/admin.py" in resign
  75.             newlog = signer(log.user, log.tbname)[0]
File "/data1/www/htdocs/749/codinglabs/2/autosigner/views.py" in signer
  245.         target = ss.get(TB_HOME, params={'kw':tbname})
File "/data1/www/htdocs/749/codinglabs/2/libs/requests/sessions.py" in get
  333.         return self.request('GET', url, **kwargs)
File "/data1/www/htdocs/749/codinglabs/2/libs/requests/sessions.py" in request
  318.         resp = self.send(prep, **send_kwargs)
File "/data1/www/htdocs/749/codinglabs/2/libs/requests/sessions.py" in send
  431.         history = [resp for resp in gen] if allow_redirects else []
File "/data1/www/htdocs/749/codinglabs/2/libs/requests/sessions.py" in resolve_redirects
  100.             if i >= self.max_redirects:

Exception Type: AttributeError at /admin/autosigner/logger/
Exception Value: 'Session' object has no attribute 'max_redirects'
```


Uh...it can't. If the session was instantiated properly, the `max_redirects` parameter must be set. Can I suggest you reinstall Requests in your environment?


@Lukasa 

Thank you for your reply :)
Session object works well most of the time on my machine. This exception occurs only in rare cases.
I don't think it has anything to do with the installation.
Never mind, it didn't bother me right now. Just want to help find some potential bugs :)


@makto could you perhaps give us more relevant information, such as the version of requests you're using and the context (in code) of the exception?


@sigmavirus24 
I traced the error and thought it could be brought by `max_redirects`'s missing in **attr**.
I pickled the session object first and then unpickled it. I believe the max_redirects is missing during the process.

See my [pull request](https://github.com/kennethreitz/requests/pull/1270)