Skip to content

TooManyRedirects error in session.py #3596

Description

@Hretic

i dont know if this has to do anything with this problem ... but i'm kinda sending request to my own app from localhost to server (basically its the same app on both side 1 on the server and 1 on the localhost)

im using requests 2.11.1

    resp = requests.get('http://apineginpay.in/api/init')
    return HttpResponse( resp.text )

TooManyRedirects at /pointer/init
Exceeded 30 redirects.
Request Method: GET
Request URL: http://localhost:8000/pointer/init
Django Version: 1.9.6
Exception Type: TooManyRedirects
Exception Value:
Exceeded 30 redirects.
Exception Location: c:\Python344\lib\site-packages\requests\sessions.py in resolve_redirects, line 110
Python Executable: c:\Python344\python.exe
Python Version: 3.4.4
Traceback Switch to copy-and-paste view

c:\Python344\lib\site-packages\django\core\handlers\base.py in get_response
response = self.process_exception_by_middleware(e, request) ...
▶ Local vars
c:\Python344\lib\site-packages\django\core\handlers\base.py in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs) ...
▶ Local vars
C:\wamp\www\djangoapp\pointer\views.py in init
resp = requests.get('http://apineginpay.in/api/init') ...
▶ Local vars
c:\Python344\lib\site-packages\requests\api.py in get
return request('get', url, params=params, *_kwargs) ...
▶ Local vars
c:\Python344\lib\site-packages\requests\api.py in request
return session.request(method=method, url=url, *_kwargs) ...
▶ Local vars
c:\Python344\lib\site-packages\requests\sessions.py in request
resp = self.send(prep, **send_kwargs) ...
▶ Local vars
c:\Python344\lib\site-packages\requests\sessions.py in send
history = [resp for resp in gen] if allow_redirects else [] ...
▶ Local vars
c:\Python344\lib\site-packages\requests\sessions.py in
history = [resp for resp in gen] if allow_redirects else [] ...
▶ Local vars
c:\Python344\lib\site-packages\requests\sessions.py in resolve_redirects
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions