You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simulating features of 'example_project.json' as directed by 'baseline_scenario.csv'...
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/rexml-3.2.4/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/minitest-5.14.4/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/ast-2.4.2/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/parser-3.0.1.1/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/openstudio_measure_tester-0.3.0/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/builder-3.2.4/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/rubocop-0.54.0/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/urbanopt-geojson-0.6.2/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/octokit-4.18.0/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/git-1.6.0/lib
adding DIR to load path: /home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/docile-1.4.0/lib
...
/home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:4: warning: already initialized constant JSON::VERSION
/var/lib/gems/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:4: warning: previous definition of VERSION was here
/home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:5: warning: already initialized constant JSON::VERSION_ARRAY
/var/lib/gems/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:5: warning: previous definition of VERSION_ARRAY was here
/home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:6: warning: already initialized constant JSON::VERSION_MAJOR
/var/lib/gems/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:6: warning: previous definition of VERSION_MAJOR was here
/home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:7: warning: already initialized constant JSON::VERSION_MINOR
/var/lib/gems/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:7: warning: previous definition of VERSION_MINOR was here
/home/ubuntu/urbanopt_example_project/.bundle/install/ruby/2.7.0/gems/json_pure-2.5.1/lib/json/version.rb:8: warning: already initialized constant JSON::VERSION_BUILD
...
Traceback (most recent call last):
10909: from /usr/local/bin/uo:23:in `<main>'
10908: from /usr/local/bin/uo:23:in `load'
10907: from /var/lib/gems/2.7.0/gems/urbanopt-cli-0.6.0/bin/uo:3:in `<top (required)>'
10906: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
10905: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
10904: from /var/lib/gems/2.7.0/gems/urbanopt-cli-0.6.0/lib/uo_cli.rb:56:in `<top (required)>'
10903: from /var/lib/gems/2.7.0/gems/urbanopt-cli-0.6.0/lib/uo_cli.rb:57:in `<module:URBANopt>'
10902: from /var/lib/gems/2.7.0/gems/urbanopt-cli-0.6.0/lib/uo_cli.rb:728:in `<module:CLI>'
... 10897 levels...
4: from /var/lib/gems/2.7.0/gems/rexml-3.2.4/lib/rexml/xmldecl.rb:83:in `encoding='
3: from /var/lib/gems/2.7.0/gems/rexml-3.2.4/lib/rexml/xmldecl.rb:83:in `encoding='
2: from /var/lib/gems/2.7.0/gems/rexml-3.2.4/lib/rexml/xmldecl.rb:81:in `encoding='
1: from /var/lib/gems/2.7.0/gems/rexml-3.2.4/lib/rexml/xmldecl.rb:81:in `puts'
/var/lib/gems/2.7.0/gems/rexml-3.2.4/lib/rexml/xmldecl.rb:81:in `puts': stack level too deep (SystemStackError)
Additional context
I believe the issue is this block of code and it's very subtle but has unintended consequences. https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/lib/urbanopt/scenario/scenario_csv.rb#L108
The issue is its loading gems in .bundle dir as the example directory includes "urbanopt" and it matches the pattern and causes run time issues as it essentially loads in all gems and many of these are duplicates. Simply renaming the directory from urbanopt_example_project to example_project everything works fine.
The text was updated successfully, but these errors were encountered:
Wow, thanks @tijcolem. If we prevent users from creating project directories with urbanopt or openstudio in the names, would that be an acceptable solution?
Expected behavior
When using the latest urbanopt cli 0.6.0, the example project fails to run after it's been created.
Actual behavior
Runtime errors associated with Globals being redefined and stack overflow presumably due to some infinite loop.
To Reproduce
Steps to reproduce the behavior:
Using ruby 2.7.2 on linux, mac or windows.
Snippets of relevant output of run command above
Additional context
I believe the issue is this block of code and it's very subtle but has unintended consequences.
https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/lib/urbanopt/scenario/scenario_csv.rb#L108
The issue is its loading gems in .bundle dir as the example directory includes "urbanopt" and it matches the pattern and causes run time issues as it essentially loads in all gems and many of these are duplicates. Simply renaming the directory from
urbanopt_example_project
toexample_project
everything works fine.The text was updated successfully, but these errors were encountered: