hi all.
When Dragonfly conducts its first energy consumption calculation using Urbanopt, it needs to be connected to the network. After the connection is established, it will retrieve the dependencies from http://rubygems.org/.
In the vast majority of areas, this process can be completed in just a few minutes. However, in areas with network restrictions, it might not be possible to directly obtain the required dependencies from this site.
This is the report related to the failure of dependency pull.
Defaulting to .bundle/install (and ignoring system wide: Bundler.configured_bundle_path.base_path=C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0)
Bundle final path is set to: D:/Desktop/test sample/.bundle/install
Defaulting to .bundle/install (and ignoring system wide: Bundler.configured_bundle_path.base_path=C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0)
Using runner options from runner.conf file
Merging in passed-in options
Initializing runner with dirname: 'D:/Desktop/test sample' and options: {:file_version=>"0.1.0", :max_datapoints=>1000000000, :num_parallel=>16, :run_simulations=>true, :verbose=>false, :gemfile_path=>"", :bundle_install_path=>"D:/Desktop/test sample/.bundle/install"}
@bundle_without_string = ''
needs_config = true
needs_platform = true
Error running command: 'bundle lock --add_platform ruby'
stdout: Fetching source index from http://rubygems.org/
stderr: Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from http://rubygems.org/ due to underlying error <IO::TimeoutError: Failed to open TCP connection to rubygems.org:80 (Blocking operation timed out!) (http://rubygems.org/specs.4.8.gz)>
Network error while fetching
http://rubygems.org/quick/Marshal.4.8/addressable-0.1.0.gemspec.rz (Failed to
open TCP connection to rubygems.org:80 (execution expired))
needs_update = true
When after a long period of time the dependencies still cannot be fully obtained, the program will stop and report the following content.
The URBANopt simulation failed to run.
No results were found at:
C:\Users\Tao\simulation\Buffalo_New_Development\run\honeybee_scenario
Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!
Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!
<internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- openstudio/common_measures (LoadError)
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Users/Tao/simulation/Buffalo_New_Development/mappers/Honeybee.rb:33:in `<top (required)>'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:93:in `block in load_mapper_files'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:92:in `each'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:92:in `load_mapper_files'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:36:in `initialize'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:497:in `new'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:497:in `run_func'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:1270:in `<module:CLI>'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:23:in `<module:URBANopt>'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:22:in `<top (required)>'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/bin/uo:3:in `<top (required)>'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/bin/uo:25:in `load'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/bin/uo:25:in `<main>'
and.
Runtime error (PythonException): The URBANopt simulation failed to run.
No results were found at:
C:\Users\Tao\simulation\Buffalo_New_Development\run\honeybee_scenario
Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!
Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!
<internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- openstudio/common_measures (LoadError)
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Users/Tao/simulation/Buffalo_New_Development/mappers/Honeybee.rb:33:in `<top (required)>'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:93:in `block in load_mapper_files'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:92:in `each'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:92:in `load_mapper_files'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-scenario-1.0.0/lib/urbanopt/scenario/scenario_csv.rb:36:in `initialize'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:497:in `new'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:497:in `run_func'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:1270:in `<module:CLI>'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:23:in `<module:URBANopt>'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:22:in `<top (required)>'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/URBANopt-cli-1.0.1/ruby/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/bin/uo:3:in `<top (required)>'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/bin/uo:25:in `load'
from C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/bin/uo:25:in `<main>'
Traceback:
line 918, in _output_urbanopt_files, "C:\Program Files\ladybug_tools\python\Lib\site-packages\dragonfly_energy\run.py"
line 342, in run_urbanopt, "C:\Program Files\ladybug_tools\python\Lib\site-packages\dragonfly_energy\run.py"
line 153, in script
Also, if the initial dependency pull fails and the contents in the C:\Users\[Username]\.bundle
folder are not cleaned up, when re-executing URBANopt, it will not re-pull and verify again in the new case, but will directly report.
I would like to know if there is any way to switch to pulling dependencies from the mirror source instead of using http://rubygems.org/. Or is it any method that allows these dependencies to be manually added to URBANopt instead of being downloaded online?
best.
Zhengrong