Dragonfly RunURBANopt component 1.3.0 - WindowsError


I followed the installation instructions for installing the Ladybug tools in this repo, I checked the compatibility matrix, and since I have LBT version 1.3.0, I have Python 3.79, Radiance 5.4a, Openstudio 3.2.0, and URBANoptCLI 0.6.2. For URBANoptCLI 0.6.2 I executed the setup-env.bat file in admin mode.

However, when I try to run the sample file from_building_solids.gh, I get a runtime error WindowsError.

I have seen a discussion in this entry showing the same error. I tried to install OpenDSS in the python version located in the ladybug_tools\python folder but I get a FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'. Then I installed the OpenDSS library in a brand new Python 3.79` installation, but the WindowsError is still there.

The only thing I have different to the compatibility matrix is the Rhino version, I am using Version 6.35.

Is there anybody that has gone through a similar error? Do I need to install Rhino 7 for this tool to work?

Any help would be very appreciated, thank you in advance.


Hi @adalbertogc ,

It’s possible the URBANopt engine has a problem with the . in your UserName. What happens if you write the geoJSON into a folder that does not have a . in it?

Then I installed the OpenDSS library in a brand new Python 3.79` installation

This is the correct way to use OpenDSS now you’ll see in the component description that you need to pip install a specific version of the urbanopt-ditto-reader onto a system Python (that’s separate from the one that comes with ladybug_tools).

Hi @chris, thank you very much for your response, I really appreciate it.

By following your advice, I installed the specific version of the urban-ditto-reader and it solved the issue. The Urbanopt component runs without problems now.

Thanks again, and I take the opportunity to say that I admire your work with Ladybug, Honeybee, DF and all the other GH plugins.


1 Like

I also encountered this problem with my Macbook. I installed urbanopt-ditto-reader, but it doesn’t work. After that, I tried to install a combination of different versions according to the compatibility matrix and still have this problem…

Ah, they system Python on Mac can be a little tricky since I think Apple already ships Mac OSX with a version of Python. I don’t have enough experience on Mac to know exactly what’s going on but, if you can make sure that this command inside of the component code is pointing towards the version of Python on which you’ve installed the urbanopt-ditto-reader, I think you should be able to get it to work.

Hello, chris. Sorry, I only have limited knowledge of python, I don’t know which python this code points to. The python that comes with my mac system is 2.7. I changed it to 3.7 in the mac terminal. I installed “urbanopt-ditto-reader” in both the terminal’s python and ladybug’s python, but this error is still reported. (In addition, there is Anaconda in my mac, I don’t know if it affects the python environment) How to specify which python the code calls? thank you!

Hi there. I am a new user myself, trying to understand the workflow in from_building_solids.gh. At a similar point above, there is nothing coming from the RunURBANOpt widget. Apparently, the dependent widget RoomEnergyResult is retrieving nothing from SQL. How do I find the error log or what should I look for with the command interface running? It looks like there are some things to do with Ruby that might be missing, though I am completely unsure because I only know how to use Python.

Here are some words about “gems” and “bundles” that I do not understand, after initiating toggle 2.

There was a mention of OpenDSS. I also installed this. Following from the advice above, this is in the same folder with my system 3.10. Is that correct? Can I not allow the default install for all users of OpenDSS and be correct?

Thank you. Happy New Year!

Hi @whf ,

I’m know that managing multiple versions of Python on Mac can usually be a bit of a mess. If you have successfully installed the urbanopt-ditto-reader in the python that we ship with ladybug_tools, then you should actually be able to run it by changing these lines of code in the component to the following:

    from honeybee.config import folders
    ext = '.exe' if os.name == 'nt' else ''
    command = '"{py_path}/ditto_reader_cli{ext}" run-opendss -f "{feature_file}" ' \
        '-s "{scenario_file}" -e "{equipment_file}"'.format(
            py_path=folders.python_scripts_path, ext=ext,
            feature_file=_geojson, scenario_file=_scenario,
            equipment_file=os.path.join(os.path.dirname(_geojson), 'electrical_database.json')

Here’s a sample file with the changed component if you want to give it a shot:
open_dss_example_test.gh (108.9 KB)

If this solves your problem and enough people are struggling with this, maybe I’ll just change the pip install urbanopt-ditto-reader to happen inside the component before it runs and we’ll just use the Python we ship with Ladybug Tools here on out.

It looks like the simulation is running successfully for you, @Geo_curious . I suggest starting out with the from_building_footprints.gh sample, which only takes a few minutes to simulate. The from_building_solids.gh sample takes a good hour or two to run to completion.

I did end up getting a successful run from the OSW option, but not URBANOpt. Maybe there is something wrong with my installation version compatibility. I have some consistent errors on the URBANOpt and when I did run the from_building_solids using OSW, it came out fragmented (image). I ran my own building solids with the same results out of OSW.

@whf ,

After mulling it over for an hour, I decided that it would be best for me to just wrap the whole installation process inside the component:

So, if you use the LB Versioner to upgrade to the latest development version, everything should be done for your automatically. You just need to be connected to the internet the first time that you run the new component.

@Geo_curious ,

That “fragmentation” is intentional. By default, multipliers are used to account for stories that repeat over the height of the building. Only unique stories are modeled in order to keep the simulation time down. You can switch to modeling fully-detailed geometry instead of multipliers by setting use_multiplier_ to False on the DF Model To Honeybee component. The exact same option exists on the DF Model To geoJSON component that is used in the URBANopt workflows. Just beware that it will significantly increase the simulation time.

1 Like

This is a shocker, but the update component did manage to fix some errors. That is a bit odd because I thought I did the most recent version of installs only three days ago, but it is good to know this for future reference. I will have to duplicate the .gh and try to runURBANOpt in another file.

Hi chris, I updated with LB Versioner and modified the path problem in run.py, the previous problems were solved. However, now I’m running into an embarrassing problem where my simulated battery doesn’t report any errors, yet it outputs no results. I guess it shouldn’t be an encoding problem, I don’t know what’s wrong. And I use uo_config_test.gh to check, std-err panel is also empty.

@whf ,

The latest development version of dragonfly includes much better error reporting. So I might suggest running the LB Versioner and making sure that you’re still getting a WindowsError. If this is the case, then something about the way you built your Dragonfly model is likely invalid and so the simulation is failing even though URBANopt is installed correctly. In this case, can you upload a sample file that recreates the issue?

Buffalo_New_Development.zip (206.0 KB)

I updated and still have this problem, it doesn’t report any errors, but the output is empty (as shown in the screenshot). gh file I am using the case file “from_building_footprints”. Here is my generated model file. Please check it out, thank you!

Hi @whf ,

I meant your Grasshopper file but, if you are only running the sample file, then I already have it. What happens when you upgrade to the 1.4 release that happened yesterday and then run the updated sample file?