From 756c67a2547edc4761303db8649fbb87fe79b2a7 Mon Sep 17 00:00:00 2001 From: Kaley White Date: Mon, 13 Jan 2025 09:47:29 -0600 Subject: [PATCH 1/2] Correct output file path generation --- src/mixpanel_utils/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mixpanel_utils/__init__.py b/src/mixpanel_utils/__init__.py index 6d41ab3..8633a47 100755 --- a/src/mixpanel_utils/__init__.py +++ b/src/mixpanel_utils/__init__.py @@ -1363,10 +1363,8 @@ def export_events( datetime.date(d.tm_year, d.tm_mon, d.tm_mday) + datetime.timedelta(x) ).strftime(date_format) - file_components = output_file.split(".") - current_file = file_components[0] + "_" + current_day - if len(file_components) > 1: - current_file = current_file + "." + file_components[1] + base, ext = os.path.splitext(output_file) + current_file = base + "_" + current_day + '.' + ext params_copy["from_date"] = current_day params_copy["to_date"] = current_day From f462f0bf1ac5052f5c6c75b2c1d1d605b673fe81 Mon Sep 17 00:00:00 2001 From: Kaley White Date: Mon, 13 Jan 2025 09:53:13 -0600 Subject: [PATCH 2/2] Correct output file path generation --- src/mixpanel_utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixpanel_utils/__init__.py b/src/mixpanel_utils/__init__.py index 8633a47..51fd595 100755 --- a/src/mixpanel_utils/__init__.py +++ b/src/mixpanel_utils/__init__.py @@ -1364,7 +1364,7 @@ def export_events( + datetime.timedelta(x) ).strftime(date_format) base, ext = os.path.splitext(output_file) - current_file = base + "_" + current_day + '.' + ext + current_file = base + "_" + current_day + ext params_copy["from_date"] = current_day params_copy["to_date"] = current_day