UTCI recipe error - The process cannot access the file because it is being used by another process

Hi LBT Community,

I’ve been running a series of UTCI maps both on my laptop and on an analysis PC, both originally working well. However, I’ve now started getting an error on the analysis PC (I believe it’s a VM), while my laptop is still running the exact same script fine.
UTCI_example_comfort_under_a_tree_with_visualisation_tools_test_fromVM.gh (208.1 KB)

Here’s the error message from the VM, also saved full report out as text file
UTCI_Error.txt (530.2 KB)

Exception ignored in: <finalize object at 0x1f656578a30; dead>
Traceback (most recent call last):
File “c:\users\ldscosa\ladybug_tools\python\lib\weakref.py”, line 572, in call
return info.func(*info.args, **(info.kwargs or {}))
File “c:\users\ldscosa\ladybug_tools\python\lib\tempfile.py”, line 797, in _cleanup
_shutil.rmtree(name)
File “c:\users\ldscosa\ladybug_tools\python\lib\shutil.py”, line 516, in rmtree
return _rmtree_unsafe(path, onerror)
File “c:\users\ldscosa\ladybug_tools\python\lib\shutil.py”, line 404, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File “c:\users\ldscosa\ladybug_tools\python\lib\shutil.py”, line 402, in _rmtree_unsafe
os.rmdir(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: ‘C:\Users\ldscosa\AppData\Local\Temp\tmpmk1mz25x’

Runtime error (PythonException): The recipe failed to run with the following summary:

Scheduled 98 tasks of which:

  • 88 ran successfully:
    • 7 ComputeSphericalViewFactors(…)
    • 1 CopyGridInfo(…)
    • 1 CopyRedistInfo(…)
    • 1 CreateDirectSky(…)
    • 1 CreateModelOccSchedules(…)
  • 1 failed:
    • 1 RunEnergySimulation(…)
  • 9 were left pending, among these:
    • 9 had failed dependencies:
      • 1 LetUtciComfortMapFly(…)
      • 1 RestructureConditionIntensityResults(…)
      • 1 RestructureConditionResults(…)
      • 1 RestructureCspResults(…)
      • 1 RestructureHspResults(…)

This progress looks :frowning: because there were failed tasks

Use the report_out attribute of recipe settings to see a full report.

Traceback:
line 179, in script

Any thoughts on why this is happening would be hugely appreciated

Thanks,
Charlie

I’m on UK hours and off on leave from end of today, back on Monday - but I’ll check in for any replies then. Thanks in advance

I encountered the excatly same problem in the same example files and I found log files for the calculating process.
logs.log (328.6 KB)

This can happen if you have one of the files in the simulation folder open in another program. For example, if you open a CSV file in Excel, Windows will lock the file in the simulation folder and not let you delete it. So make sure all files in the simulation folder are closed before running the simulation. If that fails, you can try manually deleting the simulation folder and that should give you some insight into the file that you have open.

@DavidLuo ,

Looking at your log file, your issue is different. Here is the real error from your log file:

[09:52:54.571759 ERROR] D:\OSN\src\model\PlanarSurface.cpp@629 : Cannot create a surface with vertices [[0.002, 0.002, 0], [0.002, 0, 0], [0.004, 0, 0], [0.004, 0.002, 0]]

It looks like the units of your Rhino model are not correct as you are trying to simulate a surface that is 4 millimeters by 2 millimeters.

1 Like

Thanks a lot! That is the problem. :grinning:

Happened to me too, units were in feet, didn’t we get a prompt in the past about the wrong unit being used ?