Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to draw bounding box: 'Rectangle' object has no attribute 'bbox' #289

Open
dipam7 opened this issue Nov 16, 2023 · 0 comments
Open

Comments

@dipam7
Copy link

dipam7 commented Nov 16, 2023

I was following this visualization example and it throws a warning at line 48

Failed to draw bounding box: 'Rectangle' object has no attribute 'bbox'

Looking at draw_bbox it uses element.bbox.coordinates

topleft, _, bottomright, _ = element.bbox.coordinates

However, element Rectangle doesn't have bbox, it directly has attribute coordinates

@property
def coordinates(self):
"""Gets coordinates of the rectangle"""
return ((self.x1, self.y1), (self.x1, self.y2), (self.x2, self.y2), (self.x2, self.y1))

If one of the authors can suggest an acceptable fix I can submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant