Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests.exceptions.TooManyRedirects: Exceeded 30 redirects. #246

Open
techpranav opened this issue Apr 7, 2023 · 3 comments
Open

requests.exceptions.TooManyRedirects: Exceeded 30 redirects. #246

techpranav opened this issue Apr 7, 2023 · 3 comments

Comments

@techpranav
Copy link

For below code,

from nsepy import get_history from datetime import date df = get_history(symbol="SBIN", start=date(2023,1,1), end=date(2023,1,5))

getting TooManyRedirects exception.

`C:\ProgramData\Anaconda3\envs\NSE-39\python.exe "D:\OneDrive - Technia AB\Learn\DSGS\Development\Python\NSE\Test.py"
Traceback (most recent call last):
File "D:\OneDrive - Technia AB\Learn\DSGS\Development\Python\NSE\Test.py", line 3, in
df = get_history(symbol="SBIN", start=date(2023,1,1), end=date(2023,1,5))
File "C:\Users\prsh01\AppData\Roaming\Python\Python39\site-packages\nsepy\history.py", line 138, in get_history
return get_history_quanta(**kwargs)
File "C:\Users\prsh01\AppData\Roaming\Python\Python39\site-packages\nsepy\history.py", line 143, in get_history_quanta
df = url_to_df(url=url,
File "C:\Users\prsh01\AppData\Roaming\Python\Python39\site-packages\nsepy\history.py", line 151, in url_to_df
resp = url(**params)
File "C:\Users\prsh01\AppData\Roaming\Python\Python39\site-packages\nsepy\commons.py", line 167, in call
return self.session.get(url, params=kwargs, proxies = self.proxy )
File "C:\ProgramData\Anaconda3\envs\NSE-39\lib\site-packages\requests\sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "C:\ProgramData\Anaconda3\envs\NSE-39\lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "C:\ProgramData\Anaconda3\envs\NSE-39\lib\site-packages\requests\sessions.py", line 723, in send
history = [resp for resp in gen]
File "C:\ProgramData\Anaconda3\envs\NSE-39\lib\site-packages\requests\sessions.py", line 723, in
history = [resp for resp in gen]
File "C:\ProgramData\Anaconda3\envs\NSE-39\lib\site-packages\requests\sessions.py", line 191, in resolve_redirects
raise TooManyRedirects(
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

Process finished with exit code 1
`

@Paridhicodes
Copy link

@swapniljariwala please look into this on an urgent basis.

@Harshaadhithya
Copy link

Yes, facing the same issue. Kindly please look into this asap

@alloc7260
Copy link

Use this insted : NSE-HISTORY-SCRAPER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants