Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logfile not closed after terminating simulation? #1184

Open
Fredrik1Haider opened this issue Sep 5, 2022 · 0 comments
Open

Logfile not closed after terminating simulation? #1184

Fredrik1Haider opened this issue Sep 5, 2022 · 0 comments

Comments

@Fredrik1Haider
Copy link

Fredrik1Haider commented Sep 5, 2022

Description

When appending data to the logfile generated by OMS.setLogFile, the appended text gets cutoff suggesting the file has not been closed properly after terminating the simulation, i.e. the file writing buffer is still open.

Steps to reproduce the behavior

additional_info = ["Very important to know", "Where am I?", "How did I end up here?"]

OMS.setLogFile('log.txt')
OMS.simulate...
OMS.terminate...

with open(log.txt, 'a') as logfile:
      logfile.write("\n".join(additional_info))

in resulting file parts of additional_info is missing.

Version and OS

  • Version: [OMSimulator from 2022-05-09]
  • Python 3.6.6, CentOS7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant