I am getting an error : “1. Solution exception:No URBANopt installation was found in dragonfly_energy.config.folders.” in the DF Run UrbanOpt component. I am using the sample file that was included with the installation. Any thoughts? I did follow the UrbanOpt installation as on the https://docs.urbanopt.net/installation/windows.html link.
Hi @ApoorvGoyal ,
To clarify, you downloaded and ran the .exe file and accepted all of the defaults? And you see an UrbanOpt-cli-0.3.1 folder in your C:\ drive like so?
If so, the issue is on the Dragonfly end. If not, then your URBANopt installation is not correct.
I do have the UrbanOpt folder (see below). The only thing that I had an issue with was running the windows batch commands :
I did manually add environmental variables defined in the script assuming that it might be a security setting on the company laptop.
The company laptop thing might be the issue, though it’s possible that your manual running of the second step messed with Dragonfly’s automated running of it. Can you delete the following file, then restart Rhino-Grasshopper and see if you can get it to run?
No File like that in the folder
That is the issue then. You need to have a
.env_uo.bat file in your
C:\Users\[USERNAME]) in order to be able to run the URBANopt CLI. Essentially, that batch needs to be called first before you can execute any URBANopt CLI commands.
What happens when you run
setup-env.bat? Here’s a version of the file that has a
PAUSE so you can see what’s happening.
setup-env.bat (622 Bytes)
You have to run it in the
C:\UrbanOpt-cli-0.3.1\ folder. Not your Downloads folder.
Oh sorry about that. I did that earlier (and just tried it again) - and it’s the same error.
There’s no error when you ran it from your downloads. What paths is it setting when you run it out of the urban opt folder?
Ok. That’s what we need. I’m emailing the guy who built the URBANopt installer now and hopefully I can get him to respond here. Posting it as a bug to urbanopt-cli repo might also be a good idea.
What happens when you run the .bat file as Administrator?
Running as an administrator gives the same output.
The person who built the installer had an initial guess that this was the issue:
The user might be hitting the max path char for windows.
env PATH has to be 260 chars or less.
But, seeing that your username is only 6 characters, this did not seem likely to me. I’ll let you know if there are any new explanations.
Ok, we have a new hypothesis. According to the person who built the installer:
It looks like for this user the env $HOMEPATH is not set.
This is a pretty standard env for Windows machines but it’s entirely possible that this is configured differently. The .bat script that sets up the envs uses this variable to write out the env file to their home directory.
In order to check if this is correct, can you run the .bat file below and send me a screenshot?
test.bat (22 Bytes)
(the .bat file can be anywhere on your machine when you run it)
If this proves to be the issue, I will send you another .bat file to run that should fix it.
Yes! It seems we are correct here. Can you run the following file, which will set your
HOMEPATH environmental variable to be your username that I saw in your previous screenshots:
set_homepath.bat (33 Bytes)
Then run the
setup-env.bat in the URBANopt folder and let me know if you get a file at the following path:
No luck and I still get same “invalid file” message in the setup_env.bat as before
Thank, @ApoorvGoyal . What if you run this file within the
setup-env.bat (649 Bytes)
Does it still tell you the file is invalid?