uo run -f “~~~.geojson” -s “~~~honeybee_scenario.csv”
command was executed through cmd.
And the following error occurred.
C:/URBANopt-cli-0.9.0/gems/ruby/2.7.0/gems/urbanopt-geojson-0.9.0/lib/urbanopt/geojson/feature.rb:277:in block in find_feature_center': undefined method /’ for #Array:0x000000000aec6af8 (NoMethodError)
What should I do to fix this error? Any help please?
Actually I tried running URBANopt via python scripting. But at the very end, AssertionError: The URBANopt simulation failed to run. No results were found at: ./tests/simulation\run\honeybee_scenario error occurred.
So, uo run -f “~~~.geojson” -s “~~~honeybee_scenario.csv” command was executed in cmd when I tried to run URBANopt by typing directly.
Your script there looks mostly correct but I would avoid using relative paths like that since URBANopt CLI does not handle these well (at least not on Windows where there’s a danger of exceeding the maximum number of characters in a file path).
Beyond that, I would ask you to check what version of dragonfly-energy you are using and make sure that it is the latest.
Following your suggestion, I first verified the version and proceeded to reinstall the latest version of the dragonfly-energy package, version 1.22.66.
Additionally, I changed the directory to an absolute path and made it shorter, as you advised.
However, despite my efforts, when I execute the Python code simulation_result = run_urbanopt(feature_geojson=geojson, scenario_csv=scenario_csv), I am still encountering the same problem that was previously present, started with run_dir 'D:/uo/tests/simulation/run/honeybee_scenario/ResidenceBuilding/' does not exist, simulation dir 'D:/uo/tests/simulation/run/honeybee_scenario/ResidenceBuilding/' out of date simulation_dir D:/uo/tests/simulation/run/honeybee_scenario/ResidenceBuilding/ is out of date, regenerating input files.
I executed the command uo create -p Project_1 at the homepath to create the project folder.
After that, I executed the command uo create -s Project_1/example_project.json to create the scenario csv file.
Finally, I executed the command uo run -s Project_1/baseline_scenario.csv -f Project_1/example_project.json to run the simulation and it was successful.
Based on this, I surmise that the entire path for the simulation should be consistent with the homepath drive.
However, I encountered an issue when trying to run URBANopt using Python code. I noticed that the path for the simulation files is on the D drive, not the C drive of the homepath when I run the Python code. I am currently investigating and working towards finding a solution to this issue.
The image below depicts the successful execution of the process in the command prompt.
With great care, I have relocated all the paths of the executed code and related inputs to a sub-path of the homepath.
Additionally, I have made further efforts to simplify the code.
The content of the error has been changed accordingly.
Although the URBANopt appeared to run smoothly, I encountered the following error towards the end of the process: