Bug in ladybug python

I am facing the following bug problem while I am running light simulation using python.

I have a room that is located on x=60.6 and y=220.1 and z=0. The room has a width of 2 and a depth of 9.7. The height of ceiling is 10. so this translates into:

room_7 = Room(origin=(60.6481, 220.125,0),width=2,depth= 9.75,height=10,rotation_angle=0)

In that room, there is a window placed on the back wall. The width of the window is 1 and the height is 3, which can be scripted as:


I get the following error:

**    'HBSurface height [{}].'.format(srf_height + sill_height, height)**

**AssertionError: Opening height plus sill height [4.0] should be smaller than HBSurface height [3].**

It looks like the height of the room (even though was defined as 9.7) is being considered same as width (2 width + 2 still height = 4) (See the error), which leads to an error saying that the height of the window is greater than the available height… Can anyone help me know to fix this bug? Why the height of the room is not being considered correctly?

This looks like a bug to me. Let me check and report back.

Thanks very much!
Also found another bug.

If the window wall is ‘left’, it actually places the window not to the left side. It also confuses height and width. We knew this after we visualized the results.

Floorplan_Boundries = Room(origin=(0, 0, Height), width=128, depth=263, height=9,rotation_angle=0)

   AssertionError: Opening width [9.0] should be smaller than HBSurface width [120].

Thanks! I’m checking both of them now.

1 Like

To save time, found out how to fix the first bug,
if you go to the code for Honeybee test room class
Line 80 has
def height(self):
“”“Room height.”""
return self._width

This should be changed into
def height(self):
“”“Room height.”""
return self._height

But I am still not sure how to fix the second bug

Could we possibly add these to GitHub as issues @fhalawa1 ? Would be good to keep track of these bugs in one place. Also means others could pick them up (for hacktiberfest say).

Also, if you found the solution to this bug, would you mind making a pull request to the repository with your fix? Like that we can keep records of the heroes of ladybug tools the code itself :wink:

Thanks! This should address both issues:

Update your honeybee installation by using pip install -U lbt-honeybee and try again. It works fine on my machine.

Related release: https://github.com/ladybug-tools/honeybee/releases/tag/v0.1.12

I updated it am getting this error now

File “C:\Users\fhalawa\AppData\Local\Continuum\anaconda2\lib\site-packages\honeybee\vectormath\euclid.py”, line 318, in init
self.x = x

TypeError: descriptor ‘x’ for ‘Vector3’ objects doesn’t apply to ‘Vector3’ object

@AntoineDao, Sorry I fixed this one as I felt bad for not getting back to @fhalawa1 for a very long time :persevere: I agree this could have been a good first contribution.

Also your :robot: did its job and tagged the PR successfully to honeybee and core!

1 Like

Hmm. When do you get this error? I can’t recreate the issue.

Also which version of Python are you using?

Sorry, I restarted it and it worked fine!
Thanks again Mostapha! Appreciated your quick responses!

1 Like

8 posts were split to a new topic: How to visualize the results of a daylight study outside of Grasshopper

A post was split to a new topic: Get analysis grid values for a specific sensor