Hello Eikon Developer Team,
I am encountering an issue when using the ek.get_news_headlines()
function in the Eikon API. Recently, when fetching news headlines in my project, the following traceback error has started to occur:
Traceback (most recent call last):
File "main_8.py", line [105], in <module>
df_new = ek.get_news_headlines(
File "venv/lib/site-packages/eikon/news_request.py", line 126, in get_news_headlines
return get_data_frame(result)
File "venv/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)
...
TypeError: datetime64 values must have a unit specified
It appears that the error is occurring during the conversion of datetime arrays. For context, I’m currently using NumPy version 1.26.2—which meets pandas’ dependency requirements (numpy>=1.22.4, <2.0
). This issue did not occur in my previous setup, and I suspect it might be related to changes in how NumPy handles datetime64
dtypes (i.e., requiring an explicit time unit).
Could you please advise on the following:
- Is there a known compatibility issue with the current version of the Eikon API and NumPy 1.26.2?
- What version of NumPy is officially supported or recommended for use with the current version of the Eikon API?
- Would you recommend a temporary workaround (e.g., downgrading NumPy to an earlier version such as 1.22.4) until a patch is released, or is there another fix for this issue?
Thank you very much for your assistance and guidance on this matter.
Best regards,
Vishwesh1