nsepy icon indicating copy to clipboard operation
nsepy copied to clipboard

nsepy get_history not responding - timeout occurs

Open vrp-selvam opened this issue 5 years ago • 8 comments

Hi,

I am trying to get the history of quotes using get_history, it was working sometime back but not responding now.

getting following error after waiting for long time

Error getting values HTTPConnectionPool(host='www.nseindia.com', port=80): Max retries exceeded with url: /marketinfo/sym_map/symbolCount.jsp?symbol=ADANIPORTS (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002042AEDE0C8>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

thanks for your response.

vrp-selvam avatar Jan 22 '20 15:01 vrp-selvam

@swapniljariwala the same error i am getting , it looks you have updated package 17days ago and committed changes two days back ,i have installed the changes to latest still i am getting the above mentioned error @vrp-selvam Is this solvable ,How to make the NSEPY working again. Any one Any suggestion please help.

mbmarx avatar Jan 24 '20 12:01 mbmarx

@swapniljariwala I am also getting timeout while waiting for get_history for fetching NSE options historical data. Few days back it was working. What I could debug was that nse have changed migrated their urls from www.nseindia.com to www1.nseindia.com , and hence it was not working. So, i updated the package to latest version but still it is not working. @swapniljariwala can I get your phone number or pls ping me in whatspp at +919632350035. I want to contribute to the project.

sarwankx avatar Jan 25 '20 06:01 sarwankx

Can someone please help me how to solve this error

================ RESTART: D:\OneDrive\PythonPrograms\bhavcopy.py =============== Traceback (most recent call last): File "D:\OneDrive\PythonPrograms\bhavcopy.py", line 4, in prices = get_price_list(date(2015,1,1)) File "C:\Program Files (x86)\Python38-32\lib\site-packages\nsepy\history.py", line 309, in get_price_list txt = unzip_str(res.content) File "C:\Program Files (x86)\Python38-32\lib\site-packages\nsepy\commons.py", line 122, in unzip_str zf = zipfile.ZipFile(file=fp) File "C:\Program Files (x86)\Python38-32\lib\zipfile.py", line 1267, in init self._RealGetContents() File "C:\Program Files (x86)\Python38-32\lib\zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

vishaldamani avatar Jan 27 '20 13:01 vishaldamani

@swapniljariwala @sarwankx can you please look at this issue and provide some solution .All of us waiting now. Some working solution is needed .

Others please confirm if you could fetch the data as on 31-JAN-2020

mbmarx avatar Jan 31 '20 11:01 mbmarx

NSEpy is working fine as of 31st Jan. Could you post what's error you are facing? You can't get 31st Jan price yet through get_history method. But you can use get_price_list for that. Rest is fine. Go through the thread, there is a solution which was previously an issue.

Best, Subinoy

On Fri, Jan 31, 2020 at 4:47 PM mbmarx [email protected] wrote:

@swapniljariwala https://github.com/swapniljariwala @sarwankx https://github.com/sarwankx can you please look at this issue and provide some solution .All of us waiting now. Some working solution is needed .

Others please confirm if you could fetch the data as on 31-JAN-2020

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/swapniljariwala/nsepy/issues/114?email_source=notifications&email_token=AA2TGCPTKTF2TPIOANCXN5TRAQCF7A5CNFSM4KKHHZT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKOK73Q#issuecomment-580693998, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2TGCLQNJKJR7B2AGGLH5LRAQCF7ANCNFSM4KKHHZTQ .

subinoy avatar Jan 31 '20 12:01 subinoy

@subinoy @swapniljariwala the start of this thread has the error message the same error message i am getting @vrp-selvam . Not even able to fetch any data only the error comes.

Which is the solution you are referring to can you pls link the details here to check once again.

I deleted complete package and reinstalled from the updated Branch tag still i am facing this issue.

mbmarx avatar Feb 04 '20 06:02 mbmarx

https://github.com/swapniljariwala/nsepy/issues/113

read the whole thread to solve the issue as it's changed the nsepy package installation issue now(master branch working fine). Also, read the nsepy documentation.

Best, Subinoy

On Tue, Feb 4, 2020 at 11:34 AM mbmarx [email protected] wrote:

@subinoy https://github.com/subinoy @swapniljariwala https://github.com/swapniljariwala the start of this thread has the error message the same error message i am getting @vrp-selvam https://github.com/vrp-selvam . Not even able to fetch any data only the error comes.

Which is the solution you are referring to can you pls link the details here to check once again.

I deleted complete package and reinstalled from the updated Branch tag still i am facing this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/swapniljariwala/nsepy/issues/114?email_source=notifications&email_token=AA2TGCPJ2BNQNRKUA3PNLHTRBEANNA5CNFSM4KKHHZT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKWOQAY#issuecomment-581756931, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2TGCM2N2ENWRQACBFO3QTRBEANNANCNFSM4KKHHZTQ .

subinoy avatar Feb 04 '20 07:02 subinoy

Can someone please help me how to solve this error

================ RESTART: D:\OneDrive\PythonPrograms\bhavcopy.py =============== Traceback (most recent call last): File "D:\OneDrive\PythonPrograms\bhavcopy.py", line 4, in prices = get_price_list(date(2015,1,1)) File "C:\Program Files (x86)\Python38-32\lib\site-packages\nsepy\history.py", line 309, in get_price_list txt = unzip_str(res.content) File "C:\Program Files (x86)\Python38-32\lib\site-packages\nsepy\commons.py", line 122, in unzip_str zf = zipfile.ZipFile(file=fp) File "C:\Program Files (x86)\Python38-32\lib\zipfile.py", line 1267, in init self._RealGetContents() File "C:\Program Files (x86)\Python38-32\lib\zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

Hi, did the issue fix for you, if so can you please tell me how you did it, thanks

siddcyber avatar Apr 10 '22 07:04 siddcyber