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

Getting Error:requests.exceptions.SSLError: HTTPSConnectionPool(host='www.nseindia.com', port=443): Max retries exceeded with url #4

Closed
Jainu-s opened this issue Sep 30, 2020 · 4 comments

Comments

@Jainu-s
Copy link

Jainu-s commented Sep 30, 2020

It worked fine yesterday but today it is showing error. This is the only python library that working fine with historical data without much code. Please sort out this issue thanks.

@sevakram
Copy link
Contributor

Hi @Jainu-s
Can you please provide more information

please share the code snippet and error traceback

My observation is that new NSE website is not reliable, data url is down many times

@Jainu-s
Copy link
Author

Jainu-s commented Oct 1, 2020

Hi Sir, now it's working fine sir. There is no quote end error. Thanks, sir. By the way, if possible please provide a realtime data feed. also, I would like to buy you a coffee if you share your Patreon or any other link.

@Jainu-s Jainu-s closed this as completed Oct 1, 2020
@sevakram
Copy link
Contributor

sevakram commented Oct 1, 2020

Thank you so much for your kind gesture 👍 That is really encouraging..
I haven't opened patreon account yet :)

@Jainu-s
Copy link
Author

Jainu-s commented Oct 1, 2020

Do you know about the Heroku(cloud) platform? when I installed and run your library I'm getting the below 2 errors? can you sort out what's the issue?

Error 1:

2020-10-01T16:25:00.360373+00:00 app[worker.1]: started.......
2020-10-01T16:25:02.624185+00:00 app[worker.1]: Traceback (most recent call last):
2020-10-01T16:25:02.624212+00:00 app[worker.1]: File "script.py", line 424, in
2020-10-01T16:25:02.624472+00:00 app[worker.1]: schedule.run_pending()
2020-10-01T16:25:02.624474+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 563, in run_pending
2020-10-01T16:25:02.624754+00:00 app[worker.1]: default_scheduler.run_pending()
2020-10-01T16:25:02.624756+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 94, in run_pending
2020-10-01T16:25:02.624895+00:00 app[worker.1]: self._run_job(job)
2020-10-01T16:25:02.624897+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 147, in _run_job
2020-10-01T16:25:02.625105+00:00 app[worker.1]: ret = job.run()
2020-10-01T16:25:02.625109+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 466, in run
2020-10-01T16:25:02.625367+00:00 app[worker.1]: ret = self.job_func()
2020-10-01T16:25:02.625368+00:00 app[worker.1]: File "script.py", line 311, in nifty_500_stocks
2020-10-01T16:25:02.625554+00:00 app[worker.1]: series="EQ")
2020-10-01T16:25:02.625560+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/jugaad_data/nse/init.py", line 170, in stock_df
2020-10-01T16:25:02.625720+00:00 app[worker.1]: raw = stock_raw(symbol, from_date, to_date, series)
2020-10-01T16:25:02.625724+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/jugaad_data/nse/init.py", line 108, in stock_raw
2020-10-01T16:25:02.625869+00:00 app[worker.1]: return list(itertools.chain.from_iterable(chunks))
2020-10-01T16:25:02.625873+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
2020-10-01T16:25:02.626149+00:00 app[worker.1]: yield fs.pop().result()
2020-10-01T16:25:02.626154+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/_base.py", line 425, in result
2020-10-01T16:25:02.626372+00:00 app[worker.1]: return self.__get_result()
2020-10-01T16:25:02.626376+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
2020-10-01T16:25:02.626586+00:00 app[worker.1]: raise self._exception
2020-10-01T16:25:02.626590+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/thread.py", line 56, in run
2020-10-01T16:25:02.626724+00:00 app[worker.1]: result = self.fn(*self.args, **self.kwargs)
2020-10-01T16:25:02.626728+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/jugaad_data/util.py", line 109, in wrapper
2020-10-01T16:25:02.626871+00:00 app[worker.1]: os.makedirs(cache_dir)
2020-10-01T16:25:02.626875+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/os.py", line 220, in makedirs
2020-10-01T16:25:02.627099+00:00 app[worker.1]: mkdir(name, mode)
2020-10-01T16:25:02.627129+00:00 app[worker.1]: FileExistsError: [Errno 17] File exists: '/app/.cache/nsehistory-stock'
2020-10-01T16:25:02.778307+00:00 heroku[worker.1]: Process exited with status 1

Error:2

2020-10-01T16:49:04.845924+00:00 app[worker.1]: started.......
2020-10-01T16:49:09.873783+00:00 app[worker.1]: Traceback (most recent call last):
2020-10-01T16:49:09.873822+00:00 app[worker.1]: File "script.py", line 423, in
2020-10-01T16:49:09.874106+00:00 app[worker.1]: schedule.run_pending()
2020-10-01T16:49:09.874107+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 563, in run_pending
2020-10-01T16:49:09.874400+00:00 app[worker.1]: default_scheduler.run_pending()
2020-10-01T16:49:09.874401+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 94, in run_pending
2020-10-01T16:49:09.874547+00:00 app[worker.1]: self._run_job(job)
2020-10-01T16:49:09.874547+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 147, in _run_job
2020-10-01T16:49:09.874758+00:00 app[worker.1]: ret = job.run()
2020-10-01T16:49:09.874759+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/schedule/init.py", line 466, in run
2020-10-01T16:49:09.875008+00:00 app[worker.1]: ret = self.job_func()
2020-10-01T16:49:09.875009+00:00 app[worker.1]: File "script.py", line 310, in nifty_500_stocks
2020-10-01T16:49:09.875195+00:00 app[worker.1]: normalized_data = stock_df(symbol=singlestock, from_date=date(2020, 1, 1), to_date=date(2020, 10, 1),series="EQ")
2020-10-01T16:49:09.875195+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/jugaad_data/nse/init.py", line 170, in stock_df
2020-10-01T16:49:09.875344+00:00 app[worker.1]: raw = stock_raw(symbol, from_date, to_date, series)
2020-10-01T16:49:09.875344+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/jugaad_data/nse/init.py", line 108, in stock_raw
2020-10-01T16:49:09.875472+00:00 app[worker.1]: return list(itertools.chain.from_iterable(chunks))
2020-10-01T16:49:09.875472+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
2020-10-01T16:49:09.875741+00:00 app[worker.1]: yield fs.pop().result()
2020-10-01T16:49:09.875742+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/_base.py", line 425, in result
2020-10-01T16:49:09.875990+00:00 app[worker.1]: return self.__get_result()
2020-10-01T16:49:09.875990+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
2020-10-01T16:49:09.876190+00:00 app[worker.1]: raise self._exception
2020-10-01T16:49:09.876190+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/concurrent/futures/thread.py", line 56, in run
2020-10-01T16:49:09.876317+00:00 app[worker.1]: result = self.fn(*self.args, **self.kwargs)
2020-10-01T16:49:09.876318+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/jugaad_data/util.py", line 110, in wrapper
2020-10-01T16:49:09.876448+00:00 app[worker.1]: j = function(**kw)
2020-10-01T16:49:09.876449+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/jugaad_data/nse/init.py", line 75, in _stock
2020-10-01T16:49:09.876569+00:00 app[worker.1]: j = self.r.json()
2020-10-01T16:49:09.876570+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/requests/models.py", line 898, in json
2020-10-01T16:49:09.876911+00:00 app[worker.1]: return complexjson.loads(self.text, **kwargs)
2020-10-01T16:49:09.876913+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/json/init.py", line 354, in loads
2020-10-01T16:49:09.877179+00:00 app[worker.1]: return _default_decoder.decode(s)
2020-10-01T16:49:09.877179+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/json/decoder.py", line 339, in decode
2020-10-01T16:49:09.877375+00:00 app[worker.1]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2020-10-01T16:49:09.877376+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/json/decoder.py", line 357, in raw_decode
2020-10-01T16:49:09.877579+00:00 app[worker.1]: raise JSONDecodeError("Expecting value", s, err.value) from None
2020-10-01T16:49:09.877616+00:00 app[worker.1]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-10-01T16:49:10.083685+00:00 heroku[worker.1]: Process exited with status 1

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