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

Problem with reapeted request with the equity utility #44

Open
mukundvijay123 opened this issue Dec 7, 2023 · 1 comment
Open

Problem with reapeted request with the equity utility #44

mukundvijay123 opened this issue Dec 7, 2023 · 1 comment
Assignees

Comments

@mukundvijay123
Copy link

i want to use the eq.get_price() function multiple times in the same program however it answers only 1 time and the returns errors show

1.First error ,this is shown once only
PS C:\data\stockmarket> python z_prototyping.py
{
"time": "12/07/2023 06:21:19 PM",
"lineno": "139",
"name": "[root]",
"loglevel": "ERROR",
"process": "15880",
"filename": "equity.py",
"funcName": "get_price",
"logmessage": "https://www.nseindia.com/api/historical/securityArchives?symbol=TCS&from=18-07-2023&to=06-09-2023&dataType=priceVolumeDeliverable&series=EQ got exception: Please try again in a minute.. Please try again later.",
}
Traceback (most recent call last):
File "C:\data\stockmarket\z_prototyping.py", line 12, in
print(eq.get_price(start_date, end_date, symbol="TCS"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python\Lib\site-packages\nsedt\equity.py", line 140, in get_price
raise exc
File "C:\python\Lib\site-packages\nsedt\equity.py", line 136, in get_price
dataframe = future.result()
^^^^^^^^^^^^^^^
File "C:\python\Lib\concurrent\futures_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "C:\python\Lib\concurrent\futures_base.py", line 401, in __get_result
raise self.exception
File "C:\python\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python\Lib\site-packages\nsedt\utils_init
.py", line 81, in fetch_url
raise ValueError("Please try again in a minute.")
ValueError: Please try again in a minute.

2.After the above error is shown once ,then this error keeps on occuring when i use the function

PS C:\data\stockmarket> python z_prototyping.py
Traceback (most recent call last):
File "C:\data\stockmarket\z_prototyping.py", line 12, in
print(eq.get_price(start_date, end_date, symbol="TCS"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python\Lib\site-packages\nsedt\equity.py", line 95, in get_price
cookies = utils.get_cookies()
^^^^^^^^^^^^^^^^^^^
File "C:\python\Lib\site-packages\nsedt\utils_init_.py", line 46, in get_cookies
raise ValueError("Retry again in a minute.")
ValueError: Retry again in a minute.

--I have been using this on google colab and it works everytime,but doesnt run on my local linux and windows sytem the above error keeps occuring. Any help and suggestion on how i can get it working ,pls help.

@pratik141 pratik141 self-assigned this Dec 11, 2023
@pratik141
Copy link
Owner

I am not able to reproduce this
but I am trying to investigate it

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

2 participants