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

time.sleep(0.5) to enable removing intermediate directory #54

Open
xavfa opened this issue Mar 23, 2021 · 5 comments
Open

time.sleep(0.5) to enable removing intermediate directory #54

xavfa opened this issue Mar 23, 2021 · 5 comments

Comments

@xavfa
Copy link

xavfa commented Mar 23, 2021

Dear all,
this might be more a question than an issue, but I had to add time.sleep(0.5) before line 327 in utilManageCompileLink.py for the process to reach the end, as, without, I felt each time on the error : unable to remove the directory xxx (intermediate folder for FMU building process)
is there an issue from my installation ?
EnergyPlusToFMU v3.1.0, win10, python 3.7.9. the process is launched on a prompt command window.
I've used previous version with python 2.7 but still win10 without remembering this issue.
all the best,

@tsnouidui
Copy link
Member

tsnouidui commented Mar 25, 2021

Do you see the same behavior consistently or just randomly? I can't reproduce it on my Windows 10 machine (using Python 3.8 though) or when running the unit tests

@xavfa
Copy link
Author

xavfa commented Mar 26, 2021

Well, it seems to be pretty consistently as I just tried by commenting the extra time.sleep line and had the same issue of :
ERROR from script file {utilManageCompileLink.py}
Unable to delete directory {~\bld-idf-to-fmu-export-prep-win-exe}

and with the extra line it follows its process :
! utilManageCompileLink.py -- Cleaning up intermediate files
! utilManageCompileLink.py -- Removing build directory {~\RunningFolder\bld-idf-to-fmu-export-prep-win-exe}
! EnergyPlusToFMU.py -- Running export-prep application {idf-to-fmu-export-prep-win.exe}

But with the extra line, it works fine and I managed to couple more than 20 FMUs using FMI++ package. (district level of interest). I would thus have another question regarding the options of FMUs to avoid reading the eso files or generate the csv,... is there any and if yes, is it on the FMU side or on the FMI++ side ? As, the option 'stdout=open(os.devnull, "w")' to avoid all the printings should be in the FMI++ side, no ?
Thanks for your concerns, and a bunch of thanks for the FMUtoolKit !!

@xavfa
Copy link
Author

xavfa commented Apr 18, 2021

Hi, I am coming back on this. I have changed a bit the organization of my folders in which the FMUs are automatically created and had to increase to 1s the time delay...
Pretty sure it comes now from my side, but would someone have any idea from where this could come from ?
thanks

@tsnouidui
Copy link
Member

I am not sure what the issue is and why you have to increase the time delay depending on the organization of your folders. I can't reproduce the problems.

@Sarah-N
Copy link

Sarah-N commented Oct 28, 2021

I had the same problem and adding some sleep time before deleting the directory solved it.

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

3 participants