I'm getting the below behavior when calling get_news_headlines in the python api. I'm running python 3.10.7, and eikon version 1.1.16, windows 11 Pro
Input:
> import eikon as ek
> ek.get_news_headlines('ORDER IMBALANCE', date_from='2022-10-19T00:00:00', date_to='2022-10-19T23:59:59', count=100)
Error:
File "C:\Python310\lib\site-packages\eikon\news_request.py", line 126, in get_news_headlines
return get_data_frame(result)
File "C:\Python310\lib\site-packages\eikon\news_request.py", line 144, in get_data_frame
headlines_dataframe = pd.DataFrame([], numpy.array(first_created, dtype='datetime64'), Headline_Selected_Fields)
File "C:\Python310\lib\site-packages\pandas\core\frame.py", line 770, in __init__
mgr = dict_to_mgr(
File "C:\Python310\lib\site-packages\pandas\core\internals\construction.py", line 451, in dict_to_mgr
index = ensure_index(index)
File "C:\Python310\lib\site-packages\pandas\core\indexes\base.py", line 7371, in ensure_index
return Index._with_infer(index_like, copy=copy)
File "C:\Python310\lib\site-packages\pandas\core\indexes\base.py", line 718, in _with_infer
result = cls(*args, **kwargs)
File "C:\Python310\lib\site-packages\pandas\core\indexes\base.py", line 488, in __new__
result = klass(data, copy=copy, name=name, **kwargs)
File "C:\Python310\lib\site-packages\pandas\core\indexes\datetimes.py", line 360, in __new__
dtarr = DatetimeArray._from_sequence_not_strict(
File "C:\Python310\lib\site-packages\pandas\core\arrays\datetimes.py", line 308, in _from_sequence_not_strict
subarr, tz, inferred_freq = _sequence_to_dt64ns(
File "C:\Python310\lib\site-packages\pandas\core\arrays\datetimes.py", line 2092, in _sequence_to_dt64ns
data = astype_overflowsafe(data, dtype=DT64NS_DTYPE)
File "pandas\_libs\tslibs\np_datetime.pyx", line 288, in pandas._libs.tslibs.np_datetime.astype_overflowsafe
File "pandas\_libs\tslibs\np_datetime.pyx", line 321, in pandas._libs.tslibs.np_datetime.astype_overflowsafe
ValueError: datetime64/timedelta64 values and dtype must have a unit specified
The error is dependent on the data being returned. I do not get this error for headline searches with a different query. Any ideas?