-
Notifications
You must be signed in to change notification settings - Fork 604
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
In EtasBus _apply_filters, self._oci_filters is not defined when EtasBus init called with version 4.3.0 #1693
Comments
Could you try moving this line
to the end of the __init__ method?
|
@lumagi You have ETAS interfaces, right? Could you try the fix? |
Yes, I can try the fix, probably tomorrow. Do I understand correctly, this is a regression from the 4.3.0 release? |
Yep, i think from #1532 |
That's unfortunate, especially since it's my PR :-/ |
super.__init__ calls set_filters, which is only permissible after the corresponding structures have been created in the child constructor. Hence, super.__init__ must be called after the child has finished initialization. Fixes hardbyte#1693
@zariiii9003 I was able to verify the bug and validate the fix today, see #1704. |
super.__init__ calls set_filters, which is only permissible after the corresponding structures have been created in the child constructor. Hence, super.__init__ must be called after the child has finished initialization. Fixes #1693
Describe the bug
When I generate Bus object with 'etas', it gave me error messages
dev = can.interface.Bus(interface='etas', channel='ETAS://USB/ES582.1:XXXXXX/CAN:1', bitrate=500000)
I used etas interface python-can with last version(~4.2.2), and it worked in same code.
To Reproduce
Below line added in EtasBus(can.BusABC) init at 4.3.0. It call EtasBus._apply_filters()
super().__init__(channel=channel, **kwargs)
_apply_filters got 'filters' as parameter but self._oci_filters is checked.
self._oci_filters is defined after calling _apply_filters in EtasBus init.
Expected behavior
Im not sure how self._oci_filters will be working in EtasBus. I think self._oci_filters could be defined before EtasBus.init
Additional context
OS and version: Windows 10 x64
Python version: 3.10.8
python-can version: 4.3.0
python-can interface/s (if applicable): etas
The text was updated successfully, but these errors were encountered: