Validation errors on boundry changes

Keep getting the following type of errors when adjusting boundary conditions.

Working from a previously valid model, but many rooms and po_solveadjacencies keeps changing the conditions of the surfaces to ones I do not wish, so going through each surface.

Model fails to save.

Error Below on PO_validate model, Can someone explain the

“Input boundary_condition_objects for Faces length must be 2 not 0” error?

System.ArgumentException: Command:
C:\Users\pjames\ladybug_tools\python\python -m honeybee validate model “C:\Users\pjames\Desktop\OFFLINE_Projects\RSR\20220308_modelbuild\20220308_with_plenum_21_validmodel_grasshopperdump.hbjson”
— Logging error —
Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\face.py”, line 145, in from_dict
face.boundary_condition = bc_class.from_dict(data[‘boundary_condition’])
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\boundarycondition.py”, line 175, in from_dict
return cls(data[‘boundary_condition_objects’], sub_face)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\boundarycondition.py”, line 162, in init
‘boundary_condition_objects for Faces’)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\typing.py”, line 153, in tuple_with_length
input_name, length, len(value))
AssertionError: Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\room.py”, line 144, in from_dict
faces.append(Face.from_dict(f_dict))
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\face.py”, line 154, in from_dict
cls._from_dict_error_message(data, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee_base.py”, line 118, in _from_dict_error_message
raise ValueError(msg)
ValueError: Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\room.py”, line 146, in from_dict
invalid_dict_error(f_dict, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\typing.py”, line 310, in invalid_dict_error
raise ValueError(‘{} “{}” is invalid:\n{}’.format(obj_type, full_id, error))
ValueError: Face “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\model.py”, line 159, in from_dict
rooms.append(Room.from_dict(r, tol, angle_tol))
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\room.py”, line 164, in from_dict
cls._from_dict_error_message(data, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee_base.py”, line 118, in _from_dict_error_message
raise ValueError(msg)
ValueError: Room “RN 1[Room_d5048260]” is not valid and is not following honeybee-schema:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\cli\validate.py”, line 40, in validate_model
parsed_model = Model.from_hbjson(model_json)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\model.py”, line 234, in from_hbjson
return cls.from_dict(data)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\model.py”, line 161, in from_dict
invalid_dict_error(r, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\typing.py”, line 310, in invalid_dict_error
raise ValueError(‘{} “{}” is invalid:\n{}’.format(obj_type, full_id, error))
ValueError: Room “RN 1[Room_d5048260]” is invalid:
Room “RN 1[Room_d5048260]” is not valid and is not following honeybee-schema:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\logging\handlers.py”, line 70, in emit
self.doRollover()
File “C:\Users\pjames\ladybug_tools\python\lib\logging\handlers.py”, line 394, in doRollover
self.rotate(self.baseFilename, dfn)
File “C:\Users\pjames\ladybug_tools\python\lib\logging\handlers.py”, line 111, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: ‘C:\Users\pjames\.honeybee\honeybee.log’ → ‘C:\Users\pjames\.honeybee\honeybee.log.2022-03-09’
Call stack:
File “C:\Users\pjames\ladybug_tools\python\lib\runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “C:\Users\pjames\ladybug_tools\python\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee_main
.py", line 4, in
main()
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\click\core.py”, line 829, in call
return self.main(*args, **kwargs)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\click\core.py”, line 782, in main
rv = self.invoke(ctx)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\click\core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\click\core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\click\core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\click\core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\cli\validate.py”, line 52, in validate_model
_logger.exception(‘Model validation failed.\n{}’.format(e))
Message: ‘Model validation failed.\nRoom “RN 1[Room_d5048260]” is invalid:\nRoom “RN 1[Room_d5048260]” is not valid and is not following honeybee-schema:\nFace “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:\nFace “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:\nInput boundary_condition_objects for Faces length must be 2 not 0’
Arguments: ()
honeybee.cli.validate - ERROR - Model validation failed.
Room “RN 1[Room_d5048260]” is invalid:
Room “RN 1[Room_d5048260]” is not valid and is not following honeybee-schema:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0
Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\face.py”, line 145, in from_dict
face.boundary_condition = bc_class.from_dict(data[‘boundary_condition’])
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\boundarycondition.py”, line 175, in from_dict
return cls(data[‘boundary_condition_objects’], sub_face)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\boundarycondition.py”, line 162, in init
‘boundary_condition_objects for Faces’)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\typing.py”, line 153, in tuple_with_length
input_name, length, len(value))
AssertionError: Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\room.py”, line 144, in from_dict
faces.append(Face.from_dict(f_dict))
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\face.py”, line 154, in from_dict
cls._from_dict_error_message(data, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee_base.py”, line 118, in _from_dict_error_message
raise ValueError(msg)
ValueError: Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\room.py”, line 146, in from_dict
invalid_dict_error(f_dict, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\typing.py”, line 310, in invalid_dict_error
raise ValueError(‘{} “{}” is invalid:\n{}’.format(obj_type, full_id, error))
ValueError: Face “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\model.py”, line 159, in from_dict
rooms.append(Room.from_dict(r, tol, angle_tol))
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\room.py”, line 164, in from_dict
cls._from_dict_error_message(data, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee_base.py”, line 118, in _from_dict_error_message
raise ValueError(msg)
ValueError: Room “RN 1[Room_d5048260]” is not valid and is not following honeybee-schema:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\cli\validate.py”, line 40, in validate_model
parsed_model = Model.from_hbjson(model_json)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\model.py”, line 234, in from_hbjson
return cls.from_dict(data)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\model.py”, line 161, in from_dict
invalid_dict_error(r, e)
File “C:\Users\pjames\ladybug_tools\python\lib\site-packages\honeybee\typing.py”, line 310, in invalid_dict_error
raise ValueError(‘{} “{}” is invalid:\n{}’.format(obj_type, full_id, error))
ValueError: Room “RN 1[Room_d5048260]” is invalid:
Room “RN 1[Room_d5048260]” is not valid and is not following honeybee-schema:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is invalid:
Face “Face ff888[Room_d5048260…Face_ff888cd7]” is not valid and is not following honeybee-schema:
Input boundary_condition_objects for Faces length must be 2 not 0
at Core.Utility.ExePythonCommand(String argument, String& results)
at Core.Utility.ValidateModel(String hbJsonPath)
at Core.Exporters.ToHBJson(String HbJsonFilePath)

Hi @paul, can you share your model with us for testing? From the error, it looks like you have a face with a Surface boundary condition but the information for the adjacent face has been removed.

Can you explain a bit more about the unexpected behavior? What do expect the command do and what are getting now instead?

Hi @paul, Thank you for sharing your model. I fixed it and send it back. As I mentioned, the key is to use the PO_SetAirBoundariesByGuides command. Here is a video that shows how it can be done for a sample model.

Here is the file. set_airboundary.3dm (287.2 KB) - Hope it helps!

1 Like