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

AttributeError in operator_overloading.py #43

Closed
flofeurstein opened this issue Aug 3, 2023 · 2 comments
Closed

AttributeError in operator_overloading.py #43

flofeurstein opened this issue Aug 3, 2023 · 2 comments

Comments

@flofeurstein
Copy link
Collaborator

OS: Ubuntu 22.04
python-broqer: 3.0.0
python: 3.10.12

While having an invalid assertion in my test I discovered the following error:

E       AssertionError: assert {<broqer.valu...class 'int'>)} == {}
E         (pytest_assertion plugin: representation of details failed: /home/florian/hq/git/gen3/jellosubmarine/software/.venv/lib/python3.10/site-packages/broqer/operator_overloading.py:128: AttributeError: module 'broqer' has no attribute 'op'.
E          Probably an object has a faulty __repr__.)

The problem seems to be how the CombineLatest is accessed in https://github.com/semiversus/python-broqer/blob/3.0.0/broqer/operator_overloading.py#L128

Possible fix:

broqer/operator_overloading.py

# in line 8
from broqer import op

...
# in line 128
return op.CombineLatest(operand_left, operand_right,
flofeurstein added a commit to flofeurstein/python-broqer that referenced this issue Aug 3, 2023
semiversus added a commit that referenced this issue Aug 3, 2023
@semiversus
Copy link
Owner

Release 3.0.2 merged your proposal. Ran into an issue with cirular reference and I had this problem before in this case. No solved using lazy import (import right before it's needed).

@flofeurstein
Copy link
Collaborator Author

Release 3.0.2 merged your proposal. Ran into an issue with cirular reference and I had this problem before in this case. No solved using lazy import (import right before it's needed).

Perfect, thanks for your effort!

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

2 participants