Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Measure with Chinese characters give utf-8 error

Initial Condition: Gathering data from EnergyPlus SQL file and OSM model. Will report in SI Units Error: incompatible character encodings: UTF-8 and ASCII-8BIT (erb):218:in block (4 levels) in run' (erb):211:ineach' (erb):211:in each_with_index' (erb):211:inblock (3 levels) in run' (erb):209:in each' (erb):209:ineach_with_index' (erb):209:in block (2 levels) in run' (erb):174:ineach' (erb):174:in block in run' (erb):161:ineach' (erb):161:in run' :/ruby/2.5.0/erb.rb:876:ineval' :/ruby/2.5.0/erb.rb:876:in result' C:/Users/AWE/AppData/Local/Temp/osmodel-1605838008-1/resources/measures/Midea-Ideal/measure.rb:352:inrun' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:514:in apply_measure' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:109:inblock in apply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:inapply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_reporting_measures.rb:105:in perform' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:instep' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run' :/openstudio_cli.rb:960:inexecute' :/openstudio_cli.rb:750:in execute' :/openstudio_cli.rb:1744:in<main>' eval:174:in eval' eval:174:inrequire_embedded_absolute' eval:160:in block in require_embedded' eval:154:ineach' eval:154:in require_embedded' eval:113:inrequire' eval:3:in `<main>'

Measure file :

def self.general_building_information_table(model, sqlFile, runner, is_ip_units = true) # general building information type data output general_building_information = {} general_building_information[:title] = '建筑综合信息' # name will be with section 建筑综合信息 Building Summary general_building_information[:header] = ['Data', 'Value'] general_building_information[:units] = [] # won't populate for this table since each row has different units general_building_information[:data] = []

Measure with Chinese characters give utf-8 error

Initial Condition: Gathering data from EnergyPlus SQL file and OSM model. Will report in SI Units Error: incompatible character encodings: UTF-8 and ASCII-8BIT (erb):218:in block (4 levels) in run' (erb):211:ineach' (erb):211:in each_with_index' (erb):211:inblock (3 levels) in run' (erb):209:in each' (erb):209:ineach_with_index' (erb):209:in block (2 levels) in run' (erb):174:ineach' (erb):174:in block in run' (erb):161:ineach' (erb):161:in run' :/ruby/2.5.0/erb.rb:876:ineval' :/ruby/2.5.0/erb.rb:876:in result' C:/Users/AWE/AppData/Local/Temp/osmodel-1605838008-1/resources/measures/Midea-Ideal/measure.rb:352:inrun' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:514:in apply_measure' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:109:inblock in apply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:inapply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_reporting_measures.rb:105:in perform' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:instep' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run' :/openstudio_cli.rb:960:inexecute' :/openstudio_cli.rb:750:in execute' :/openstudio_cli.rb:1744:in<main>' eval:174:in eval' eval:174:inrequire_embedded_absolute' eval:160:in block in require_embedded' eval:154:ineach' eval:154:in require_embedded' eval:113:inrequire' eval:3:in `<main>'

Measure file :

def self.general_building_information_table(model, sqlFile, runner, is_ip_units = true) # general building information type data output general_building_information = {} general_building_information[:title] = '建筑综合信息' # name will be with section 建筑综合信息 Building Summary general_building_information[:header] = ['Data', 'Value'] general_building_information[:units] = [] # won't populate for this table since each row has different units general_building_information[:data] = []