From e30c01fe589d5fe221c07571aafcb12397dbe83f Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Wed, 15 Nov 2023 10:00:30 +0000 Subject: [PATCH 1/4] fixed incorrect file extension --- LadybugTools_Engine/Compute/EPWtoCSV.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LadybugTools_Engine/Compute/EPWtoCSV.cs b/LadybugTools_Engine/Compute/EPWtoCSV.cs index c466fa1e..4b6e44b9 100644 --- a/LadybugTools_Engine/Compute/EPWtoCSV.cs +++ b/LadybugTools_Engine/Compute/EPWtoCSV.cs @@ -51,7 +51,7 @@ public static string EPWtoCSV(string epwFile, bool includeAdditional = false) PythonEnvironment env = InstallPythonEnv_LBT(true); epwFile = System.IO.Path.GetFullPath(epwFile); - string csvFile = System.IO.Path.ChangeExtension(epwFile, ".hbjson"); + string csvFile = System.IO.Path.ChangeExtension(epwFile, ".csv"); string script = Path.Combine(Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped", "epw_to_csv.py"); From d45dd9ba182de62c25e65e85813c87aea687dca8 Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Wed, 15 Nov 2023 10:06:16 +0000 Subject: [PATCH 2/4] now returns null when file conversion failed, rather than a path to a nonexistent file. --- LadybugTools_Engine/Compute/EPWtoCSV.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/LadybugTools_Engine/Compute/EPWtoCSV.cs b/LadybugTools_Engine/Compute/EPWtoCSV.cs index 4b6e44b9..03f48558 100644 --- a/LadybugTools_Engine/Compute/EPWtoCSV.cs +++ b/LadybugTools_Engine/Compute/EPWtoCSV.cs @@ -62,6 +62,7 @@ public static string EPWtoCSV(string epwFile, bool includeAdditional = false) if (!File.Exists(csvFile)) { BH.Engine.Base.Compute.RecordError($"File conversion failed due to {result}"); + return null; } return csvFile; From ecacc2fb30a807ad4e2b82d4fb31467fba727be3 Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Wed, 15 Nov 2023 10:00:30 +0000 Subject: [PATCH 3/4] fixed incorrect file extension --- LadybugTools_Engine/Compute/EPWtoCSV.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LadybugTools_Engine/Compute/EPWtoCSV.cs b/LadybugTools_Engine/Compute/EPWtoCSV.cs index c466fa1e..4b6e44b9 100644 --- a/LadybugTools_Engine/Compute/EPWtoCSV.cs +++ b/LadybugTools_Engine/Compute/EPWtoCSV.cs @@ -51,7 +51,7 @@ public static string EPWtoCSV(string epwFile, bool includeAdditional = false) PythonEnvironment env = InstallPythonEnv_LBT(true); epwFile = System.IO.Path.GetFullPath(epwFile); - string csvFile = System.IO.Path.ChangeExtension(epwFile, ".hbjson"); + string csvFile = System.IO.Path.ChangeExtension(epwFile, ".csv"); string script = Path.Combine(Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped", "epw_to_csv.py"); From 0a3b9555a1988e91dcbce327dcebb2c0384c460e Mon Sep 17 00:00:00 2001 From: Thomas Edward Kingstone Date: Wed, 15 Nov 2023 10:06:16 +0000 Subject: [PATCH 4/4] now returns null when file conversion failed, rather than a path to a nonexistent file. --- LadybugTools_Engine/Compute/EPWtoCSV.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/LadybugTools_Engine/Compute/EPWtoCSV.cs b/LadybugTools_Engine/Compute/EPWtoCSV.cs index 4b6e44b9..03f48558 100644 --- a/LadybugTools_Engine/Compute/EPWtoCSV.cs +++ b/LadybugTools_Engine/Compute/EPWtoCSV.cs @@ -62,6 +62,7 @@ public static string EPWtoCSV(string epwFile, bool includeAdditional = false) if (!File.Exists(csvFile)) { BH.Engine.Base.Compute.RecordError($"File conversion failed due to {result}"); + return null; } return csvFile;