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

**URL:** <https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856>\
**Category:** honeybee\
**Tags:** utci\
**Created:** [March 29, 2022, 3:46pm UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856 "2022-03-29T15:46:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlie.brooker](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/charlie.brooker/32/27164_2.png) [@charlie.brooker](https://discourse.ladybug.tools/u/charlie.brooker)\
**Post date:** [March 29, 2022, 3:46pm UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856/1 "2022-03-29T15:46:30Z")

</div>

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](https://discourse.ladybug.tools/uploads/short-url/Abmg7jFcFnXToscptUh4dTSqqpN.gh) (208.1 KB)

Here’s the error message from the VM, also saved full report out as text file  
[UTCI\_Error.txt](https://discourse.ladybug.tools/uploads/short-url/m5KG4UHRDToz4cH18XB7yEqowUW.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 ☹ 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

---

<div class="post-metadata">

**Author:** ![charlie.brooker](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/charlie.brooker/32/27164_2.png) [@charlie.brooker](https://discourse.ladybug.tools/u/charlie.brooker)\
**Post date:** [March 29, 2022, 3:53pm UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856/2 "2022-03-29T15:53:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DavidLuo](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@DavidLuo](https://discourse.ladybug.tools/u/DavidLuo)\
**Post date:** [September 7, 2022, 2:43am UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856/3 "2022-09-07T02:43:37Z")

</div>

I encountered the excatly same problem in the same example files and I found log files for the calculating process.  
[logs.log](https://discourse.ladybug.tools/uploads/short-url/30CwbUf0VE0w9vs4iWpZPPIdWsl.log) (328.6 KB)

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [September 17, 2022, 5:44pm UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856/4 "2022-09-17T17:44:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [September 17, 2022, 5:53pm UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856/5 "2022-09-17T17:53:22Z")

</div>

@DavidLuo ,

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

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/a/2/a2ce3c4f2ad06bf58dce294cd13f6af17bf5e8c4.png)

```auto
[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.

---

<div class="post-metadata">

**Author:** ![DavidLuo](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@DavidLuo](https://discourse.ladybug.tools/u/DavidLuo)\
**Post date:** [September 18, 2022, 8:30am UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856/6 "2022-09-18T08:30:22Z")

</div>

Thanks a lot! That is the problem. 😀

---

<div class="post-metadata">

**Author:** ![Alakelele](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/alakelele/32/23475_2.png) [@Alakelele](https://discourse.ladybug.tools/u/Alakelele)\
**Post date:** [April 2, 2024, 6:12pm UTC](https://discourse.ladybug.tools/t/utci-recipe-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/17856/7 "2024-04-02T18:12:25Z")

</div>

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