OpenStudio CLI with Radiance - SQL Issue

asked 2018-06-21 21:36:13 -0500

bobw's avatar

updated 2018-06-25 20:34:39 -0500

I'm having issues running the radiance measure from a command line.

The same workflow works fine in PAT and in the OpenStudio GUI.

The first issue pops up when running this line within the radiance measure (around line 700):

sql_file = OpenStudio::SqlFile.new(File.join(Dir.pwd, epout_dir, 'run/eplusout.sql'))

In PAT this would create a new folder 'run' within the already created 'epout_dir' and create the sql file in this directory.

In the CLI this doesn't create the 'run' folder or the sql file. When I interrogate the sql file in the ruby measure it still lists the sql path as this 'run' directory but in the filesystem the file doesn't exist. The measure fails when attempting to copy the sql file to the radiance directory.

[11:32:44.650347 ERROR] No such file or directory @ rb_sysopen - eplus_preprocess/run/eplusout.sql

I tried to get around this by creating the 'run' directory using a mkdir command. This allows the eplusout.sql to be created (I can see it in the filesystem) but the measure fails as the sql connection does not remain open.

[12:02:50.194347 ERROR] SqlFile c:/test_osw/run/011_radiance_daylighting_measure/eplus_preprocess/run/eplusout.sql connection is not open

Presumably this is some sort of access / permissions issue or maybe a Windows thing. I have probably made a basic error somewhere.

Does anyone have success using this measure from CLI? Any suggestions to resolve? When I get a chance I will set up a virtual linux machine to test.

I'm using Windows and OpenStudio 2.3.0. I have tried from c:/test_osw and from my dropbox folder.


UPDATE 26 June 2018

I longer think that SQL is the root cause of this (but who knows, really). Since this post I have tried the following:

  1. The original post was on a Friday, on a work computer - possibly relevant as updates may have occurred over the weekend.
  2. On the Monday I installed OpenStudio 2.4.0 and tested (before trying to repeat Friday's attempts on OpenStudio 2.3.0). This failed with a message Exception: Embedded file not found ':c:/ruby/2.2.0/gems/openstudio-workflow-1.3.1/lib/openstudio/workflow/version.rb' eval:81:in 'getFileAsString': unexpected return This error message was received without the workflow running at all. When I tried with OpenStudio versions 2.2.0, 2.3.0 and 2.5.0 the same errors popped up. No workflow would run.
  3. I tried installing various OpenStudio versions on my home laptop (which has had various versions of OpenStudio over the years) and the same 'Embedded file not found' exception popped up
  4. On my home laptop I installed ruby 2.2.4 and tested again (without changing any paths) and the workflow ran, but this time I noticed the 'embedded file not found' exception buried within the outputs of the workflow. The workflow failed as per the original post. It is possible the runs on Friday contained this exception ...
(more)
edit retag flag offensive close merge delete

Comments

Thanks for this report. We will have to look into this; I'm sorry I don't have an answer for you immediately. Have you tried a newer version of OpenStudio? I most recently used 2.4.1 on a project...

rpg777's avatar rpg777  ( 2018-06-22 09:54:14 -0500 )edit

Thanks rpg777.

I tried with 2.4.0 and ran into a whole new set of problems. See above for description. I'm not sure if the problem(s) is within the CLI, the measure or the user.

bobw's avatar bobw  ( 2018-06-25 20:37:48 -0500 )edit