I've been using the same code to collect events every 15 minutes from the database for a few months now, but since yesterday I keep getting the error:
UserWarning: GDELT did not return data for date time 20200331120000 warnings.warn(message)
The code that I am using is:
gd2 = gdelt.gdelt(version=2)
results = gd2.Search('2020 03 31',table='events',output='json')
It works when collecting data for a date that it not the current date (31st March), so I think maybe it is because instead of collecting the latest 15 minutes, it is collecting whole day files only?
Is there a way to fix this?
I'm using python 3.5 64 bit on windows.
EDIT: the issue seems to be with the timezone as due to the timezone changing in the UK on the 29th, the URL being requested from the database is one hour ahead of the data available, which is the issue.
EDIT: I've temporarily fixed it by changing line 174 in dateFuncs.py to subtract an hour instead of using datetime.now() directly, would it be possible to add a feature to be able to set this from the Search function itself rather than changing dateFuncs manually?
I've been using the same code to collect events every 15 minutes from the database for a few months now, but since yesterday I keep getting the error:
UserWarning: GDELT did not return data for date time 20200331120000 warnings.warn(message)
The code that I am using is: gd2 = gdelt.gdelt(version=2) results = gd2.Search('2020 03 31',table='events',output='json')
It works when collecting data for a date that it not the current date (31st March), so I think maybe it is because instead of collecting the latest 15 minutes, it is collecting whole day files only?
Is there a way to fix this? I'm using python 3.5 64 bit on windows.
EDIT: the issue seems to be with the timezone as due to the timezone changing in the UK on the 29th, the URL being requested from the database is one hour ahead of the data available, which is the issue.
EDIT: I've temporarily fixed it by changing line 174 in dateFuncs.py to subtract an hour instead of using datetime.now() directly, would it be possible to add a feature to be able to set this from the Search function itself rather than changing dateFuncs manually?
Thank you.