# Using the URBANopt Component

**URL:** <https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996>\
**Category:** dragonfly\
**Created:** [November 17, 2020, 5:51pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996 "2020-11-17T17:51:18Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicmancio](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/n/3e96dc/32.png) [@nicmancio](https://discourse.ladybug.tools/u/nicmancio)\
**Post date:** [November 17, 2020, 5:51pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/1 "2020-11-17T17:51:18Z")

</div>

Hi @chris, I’m trying to run URBANopt. I hope that replying here this can be useful.  
I did the installation following the procedure but I have this error.  
Do you have any raccomandation?

 ![urbanopt](https://discourse.ladybug.tools/uploads/default/original/3X/b/a/baca5875ff6645299024a99d4e0e6fa23b871fb2.png)

---

<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:** [November 18, 2020, 4:50am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/2 "2020-11-18T04:50:30Z")

</div>

@nicmancio ,

Did you install the URBANopt as mentioned at the end of the installation instructions:

> **[ladybug-tools/lbt-grasshopper](https://github.com/ladybug-tools/lbt-grasshopper/wiki/1.1-Windows-Installation-Steps)**
>
> :green\_book: Collection of all Ladybug Tools plugins for Grasshopper - ladybug-tools/lbt-grasshopper

You should have run the executable installer that they have there.

---

<div class="post-metadata">

**Author:** ![nicmancio](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/n/3e96dc/32.png) [@nicmancio](https://discourse.ladybug.tools/u/nicmancio)\
**Post date:** [November 18, 2020, 9:06am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/3 "2020-11-18T09:06:58Z")

</div>

Yes @chris, I followed the steps. Update to version 0.4.0.  
If I open the component I can see this error.

 ![urbanopt error](https://discourse.ladybug.tools/uploads/default/original/3X/3/5/3553b7445403f5c305f4e541bc92b11f90d260ea.jpeg)

The only installation step that is not clear to me is point 3:  
_When launching new shell terminals, run the correct environment config to setup the environment._

---

<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:** [November 18, 2020, 11:34pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/4 "2020-11-18T23:34:59Z")

</div>

@nicmancio . That’s the issue, then. I didn’t realize that they had released URBANopt version 0.4.0 and it’s possible that it might still be a beta since all of the documentation is written for 0.3.1. Uninstall what you currently have and install version 0.3.1. I’ll look into upgrading Ladybug Tools to use the later version soon.

Also, there’s no need to do the environment variable config step. Dragonfly will do that for you automatically.

---

<div class="post-metadata">

**Author:** ![nicmancio](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/n/3e96dc/32.png) [@nicmancio](https://discourse.ladybug.tools/u/nicmancio)\
**Post date:** [November 19, 2020, 10:29am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/6 "2020-11-19T10:29:45Z")

</div>

Hi @chris . That was exactly the problem. Now everything works fine. Looking forward to the December 3rd webinar, thank you for your prompt reply.

---

<div class="post-metadata">

**Author:** ![DanijelRusovan](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/danijelrusovan/32/720_2.png) [@DanijelRusovan](https://discourse.ladybug.tools/u/DanijelRusovan)\
**Post date:** [April 15, 2021, 12:13pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/7 "2021-04-15T12:13:21Z")

</div>

Hi @chris

I’ve just installed LB 1.2 package with compatible Radiance/E+/UrbanOpt 0.5 and I am having some issues getting urbanopt to work and it is the tool I need to most atm.  
Initially I was getting the following error: “1. Solution exception:No URBANopt installation was found in dragonfly\_energy.config.folders.”

Then, I have tried running setup-env.bat file from ([Dragonfly / UrbanOpt error - #24 by chris](https://discourse.ladybug.tools/t/dragonfly-urbanopt-error/11626/24)) but think it made things worse as the error reported now is as below

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/c/1/c1f741c3ed2c2c01e0e392621998b1f18e5efe08.png)

Also, not sure if it is needed to run the commands below after installing UrbanOpt? Guess no?

* * *

c:\urbanopt-cli-X.X.X\setup-env.bat  
%HOMEPATH%.env\_uo.bat

* * *

Any help would be really appreciated.

---

<div class="post-metadata">

**Author:** ![DanijelRusovan](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/danijelrusovan/32/720_2.png) [@DanijelRusovan](https://discourse.ladybug.tools/u/DanijelRusovan)\
**Post date:** [April 15, 2021, 2:26pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/8 "2021-04-15T14:26:06Z")

</div>

hi again @chris ,

I have tried to edit the setup-env.bat file by adding the Homapath as per image below and after running this bat file, _ **.env\_uo.bat** _ file appeared in _C:\Users\29660_, and the component now doesnt report any errors, but it also isn’t giving any results so I am really super confused how to make this work.

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/d/b/dbbaf21edfe9a506b463818c71032f956f442fb7.png)

![image](https://discourse.ladybug.tools/uploads/default/original/3X/0/4/0405ad84054704c77edd5b92241057c3c847c620.png)

I am running one of the sample files (_from\_building\_footprints.gh_) and I’m using meters. Any ideas what can be causing this?

---

<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:** [April 26, 2021, 11:58pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/9 "2021-04-26T23:58:50Z")

</div>

Hi @DanijelRusovan ,

Interesting. I am guessing that you are not the only user on the machine since the HOMEPATH was clearly set to something but I guess it was not your username. In any case, what you did should fix it until the next time that you upgrade URBANopt.

What does the folder look like where the geoJSON was written to? Was it able to get through the running of the simulations such that you see the output OSM and SQL files?

---

<div class="post-metadata">

**Author:** ![DanijelRusovan](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/danijelrusovan/32/720_2.png) [@DanijelRusovan](https://discourse.ladybug.tools/u/DanijelRusovan)\
**Post date:** [April 27, 2021, 6:39am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/10 "2021-04-27T06:39:30Z")

</div>

hi @chris

The username is correct, its a number - strange, I know! 🙂  
I don’t think I see OSM/SQL files, so something weird is happening - screenshot below.  
I’ve also run Rhino 7 as admin

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/e/c/eca897657c2a305bb037a554b7f2441b876203f2.png)

Also, when running the simulation, I get a bunch of errors like this, even though these folders exist in the run folder.

run\_dir ‘C:/test\_district5/run/honeybee\_scenario/OfficeBldg\_1/’ does not exist, simulation dir ‘C:/test\_district5/run/honeybee\_scenario/OfficeBldg\_1/’ out of date  
simulation\_dir C:/test\_district5/run/honeybee\_scenario/OfficeBldg\_1/ is out of date, regenerating input files

---

<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:** [April 27, 2021, 4:22pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/11 "2021-04-27T16:22:37Z")

</div>

I think those might be errors and not warnings, @DanijelRusovan . What does the directory at `C:/test_district5/run/honeybee_scenario/OfficeBldg_1` look like? Are there all of the result files there? Or is there an EnergyPlus .err file that could tell you if something went wrong?

---

<div class="post-metadata">

**Author:** ![DanijelRusovan](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/danijelrusovan/32/720_2.png) [@DanijelRusovan](https://discourse.ladybug.tools/u/DanijelRusovan)\
**Post date:** [April 29, 2021, 6:09am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/12 "2021-04-29T06:09:39Z")

</div>

these are all the files I see.  
 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/5/6/5635811ef554d7c350e3050f24447458e8cec42f.png)

I’ve attached the osw.log file in case this helps?  
[in.osw.log](https://discourse.ladybug.tools/uploads/short-url/zSrUu5LV4lUKlpxH1giWoqpEQva.log) (1.9 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:** [April 30, 2021, 12:28am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/13 "2021-04-30T00:28:24Z")

</div>

@DanijelRusovan ,

This seems to be the real error:

`Error: cannot load such file -- tmpdir in :/ruby/2.5.0/gems/bundler-2.1.0/lib/bundler.rb:769:in `require’`

I don’t know what is wrong with your bundler installation but maybe you should try uninstalling and then reinstalling URBANopt. If that does not fix it, this is probably something that should be reported on the URBANopt CLI GitHub:

> **[urbanopt/urbanopt-cli](https://github.com/urbanopt/urbanopt-cli)**
>
> URBANopt command line interface. Contribute to urbanopt/urbanopt-cli development by creating an account on GitHub.

You should open an issue there and attach a link to the log file.

---

<div class="post-metadata">

**Author:** ![Omprakash](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/o/9f8e36/32.png) [@Omprakash](https://discourse.ladybug.tools/u/Omprakash)\
**Post date:** [July 1, 2021, 12:58am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/14 "2021-07-01T00:58:55Z")

</div>

Continuing the discussion from [Using the URBANopt Component](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/13):

Hi @chris  
I am trying to use UrbanOpt 0.6.0 and run the “from \_building\_footprints.gh”. However, the simulation is throwing the below error as shown in the snapshot

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/8/e/8e10f9da508ec3f434c5907b224952edcf2077ea.jpeg)

Can you give me some ways to sort this out and run the model, hassle free

---

<div class="post-metadata">

**Author:** ![BardoSalgado](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/bardosalgado/32/22347_2.png) [@BardoSalgado](https://discourse.ladybug.tools/u/BardoSalgado)\
**Post date:** [July 1, 2021, 9:09am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/15 "2021-07-01T09:09:14Z")

</div>

Hi, I just faced the same error when testing my geometries. Apparently, this happened because I was saving a different scenario in the same folder when converting the DF model to geoJSON so I just changed the folder and it worked

---

<div class="post-metadata">

**Author:** ![Omprakash](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/o/9f8e36/32.png) [@Omprakash](https://discourse.ladybug.tools/u/Omprakash)\
**Post date:** [July 2, 2021, 4:59am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/16 "2021-07-02T04:59:57Z")

</div>

Thanks. However, I am not getting the complete idea here. Can you put any snapshot for better clarity

---

<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:** [July 7, 2021, 2:49am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/17 "2021-07-07T02:49:45Z")

</div>

@Omprakash ,

I think this is happening because Rhino doesn’t have permission to fully delete the simulation folder before it overwrites an existing project folder. So you either have to manually delete the folder where the GeoJSON is written before exporting a new one or just use the `_folder_` input to specify a new project folder for each simulation you run.

I think running Rhino as Administrator might also give Rhino permission to fully overwrite existing project folder.

---

<div class="post-metadata">

**Author:** ![Omprakash](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/o/9f8e36/32.png) [@Omprakash](https://discourse.ladybug.tools/u/Omprakash)\
**Post date:** [July 7, 2021, 5:27am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/18 "2021-07-07T05:27:08Z")

</div>

@chris  
I have deleted the earlier GeoJSON folder, only keeping the “MassPikeDistrict” file. However, the same error seems to continue. Attaching the snapshot below.

 ![Dragonfly issues](https://discourse.ladybug.tools/uploads/default/original/3X/4/d/4d45d4c3976203f9caefe0600b39898dc5dc050c.png)

---

<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:** [July 7, 2021, 4:24pm UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/19 "2021-07-07T16:24:09Z")

</div>

What version of URBANopt CLI are you using and does it align correctly with the compatibility matrix?

> **[ladybug-tools/lbt-grasshopper](https://github.com/ladybug-tools/lbt-grasshopper/wiki/1.4-Compatibility-Matrix)**
>
> 1.4-Compatibility-Matrix

---

<div class="post-metadata">

**Author:** ![Omprakash](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/o/9f8e36/32.png) [@Omprakash](https://discourse.ladybug.tools/u/Omprakash)\
**Post date:** [July 14, 2021, 9:29am UTC](https://discourse.ladybug.tools/t/using-the-urbanopt-component/11996/20 "2021-07-14T09:29:57Z")

</div>

> [@Omprakash](#):
>
> I am trying to use UrbanOpt 0.6.0

I am using UrbanOpt 0.6.0 and Rhino 7. I am not seeing any problem wrt the compatibility here.
