tvdatafeed
tvdatafeed copied to clipboard
ERROR:tvDatafeed.main:Connection is already closed.
Hi StreamAlpha,
I am getting this error "ERROR:tvDatafeed.main:Connection is already closed" for some sources. e.g:
outputData=tv.get_hist('EURUSD','FXCM',Interval.in_1_minute,n_bars=2000)
The above code line runs into the error mentioned above. Though If I change the source it works as expected. Please help me out in issue since particular sources are very important for me. I am facing similar issue with FOREX.com:DJI.
Attaching stacktrace for your assistance:
AttributeError Traceback (most recent call last)
<ipython-input-18-a01576d86815> in <module>
----> 1 outputData=tv.get_hist('EURUSD','FXCM',Interval.in_1_minute,n_bars=2000)
F:\Anaconda\lib\site-packages\tvDatafeed\main.py in get_hist(self, symbol, exchange, interval, n_bars, fut_contract)
474 break
475
--> 476 return self.__create_df(raw_data, symbol)
477
478
F:\Anaconda\lib\site-packages\tvDatafeed\main.py in __create_df(raw_data, symbol)
339 @staticmethod
340 def __create_df(raw_data, symbol):
--> 341 out = re.search('"s":\[(.+?)\}\]', raw_data).group(1)
342 x = out.split(',{"')
343 data = list()
AttributeError: 'NoneType' object has no attribute 'group'