Closed ghost closed 1 year ago
You are right. I see the error. I have moved BaseService out of the service folder because of a circular dependency problem. __get_all_subclasses will work only if the service module is loaded.
Of course, when the unit test runs, this module gets loaded before the test_response ad the test_request test suite.
Will fix
As a workaround, you can replace your first line by from udsoncan import Request, Response, services
Thanks for the fast reply and resolution. I approved your pr, as your change fixes the problem on my side :) Thanks for the workaround code, but I already excluded 1.17.0 and 1.17.1 from my pipeline. No problem from my side to stay at 1.16 until 1.17.2 or 1.18 goes live :)
Thanks a lot for the fast fix :)
Hi pylessard,
in the latest releases (1.17 and 1.17.1), the from_payload(...) function from Request and Response does not seem to resolve CAN-IDs any more. The cause seems to be, that BaseService.__get_all_subclasses(cls) in BaseService.from_request_id(cls, given_id) seems to return an empty array.
I have attached a minimal working example, which works correctly in 1.16, but not in 1.17 and 1.17.1.
Is this an issue, or do i have to change something on my side for 1.17+?
I hope you have a nice day, Daniel