Skip to content

Commit d733d66

Browse files
authored
Merge pull request #164 from RWTH-EBC/163_error_savepath [PYPI-RELEASE]
163 error savepath
2 parents 9e33fbf + 8c806c6 commit d733d66

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,5 @@
130130
- v0.6.0
131131
- Use load_time_series_data instead of TimeSeriesData #160
132132
- By default, don't use multicolumn for TimeSeriesData #160
133+
- v0.6.1
134+
- Fix a savepath bug #163

ebcpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
from .optimization import Optimizer
99

1010

11-
__version__ = '0.6.0'
11+
__version__ = '0.6.1'

ebcpy/simulationapi/dymola_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,11 @@ def empty_postprocessing(mat_result, **_kwargs):
636636
# Get the working_directory of the current dymola instance
637637
self.dymola.cd()
638638
# Get the value and convert it to a 100 % fitting str-path
639-
dymola_working_directory = Path(self.dymola.getLastErrorLog().replace("\n", ""))
639+
cd_log = self.dymola.getLastErrorLog()
640+
if cd_log.endswith("\n"): # Typically ends with \n
641+
cd_log = cd_log[:-1]
642+
# Sometimes, the other logs are also included. Only use the last line.
643+
dymola_working_directory = Path(cd_log.split("\n")[-1])
640644
if dymola_working_directory != self._get_worker_directory(use_mp=self.use_mp):
641645
self.logger.warning(
642646
"The working directory set by ebcpy and the one with the result does not match: "

0 commit comments

Comments
 (0)