vsjha18 / nsetools

Realtime Data From National Stock Exchange (India)
http://nsetools.readthedocs.io
MIT License
820 stars 422 forks source link

nse_getquote() Not working , getting error #147

Open jayshrisonalekar opened 1 year ago

jayshrisonalekar commented 1 year ago

q= nse.get_quote('infy') Traceback (most recent call last): File "", line 1, in File "C:\Users\yoges\AppData\Roaming\Python\Python311\site-packages\nsetools\nse.py", line 152, in get_quote if self.is_valid_code(code): ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yoges\AppData\Roaming\Python\Python311\site-packages\nsetools\nse.py", line 138, in is_valid_code stock_codes = self.get_stock_codes() ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\yoges\AppData\Roaming\Python\Python311\site-packages\nsetools\nse.py", line 117, in get_stock_codes res = self.opener.open(req) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 557, in error result = self._call_chain(args) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 496, in _call_chain result = func(args) ^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 557, in error result = self._call_chain(args) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 496, in _call_chain result = func(args) ^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 557, in error result = self._call_chain(args) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 496, in _call_chain result = func(args) ^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 557, in error result = self._call_chain(args) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 496, in _call_chain result = func(args) ^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 557, in error result = self._call_chain(args) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 496, in _call_chain result = func(args) ^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 557, in error result = self._call_chain(args) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 496, in _call_chain result = func(args) ^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\urllib\request.py", line 738, in http_error_302 raise HTTPError(req.full_url, code, urllib.error.HTTPError: HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop. The last 30x error message was: Moved Permanently

bangavineet commented 1 year ago

Getting the same error as mentioned above.

itserror404 commented 1 year ago

same, any fixes?

swarndogra commented 11 months ago

yes, same error , please help !

agent-reagent commented 10 months ago

is there any fix yet? it keeps giving http error 301

parth5757 commented 1 month ago

solved or not?