Skip to content

Commit

Permalink
fix bug in get_events that chokes on subsecond values in timestamp (w…
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgitonga authored May 9, 2024
1 parent b3b9d15 commit 2fa1e1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ecoscope/io/earthranger.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import geopandas as gpd
import pandas as pd
import requests
from dateutil import parser
from erclient.client import ERClient, ERClientException, ERClientNotFound
from tqdm.auto import tqdm

Expand Down Expand Up @@ -632,7 +633,8 @@ def get_events(
)

assert not df.empty
df["time"] = pd.to_datetime(df["time"])

df["time"] = df["time"].apply(lambda x: pd.to_datetime(parser.parse(x)))

gdf = gpd.GeoDataFrame(df)
if gdf.loc[0, "location"] is not None:
Expand Down
2 changes: 1 addition & 1 deletion ecoscope/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.7.0"
__version__ = "1.7.1"

0 comments on commit 2fa1e1a

Please sign in to comment.