You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a C++ application and using Pybind11 to reference the j1939 library. When calling the stop method of the ecu, I'm getting the following:
Exception in thread j1939.ecu job_thread:
Traceback (most recent call last):
File "C:\Users\darife\AppData\Local\Programs\Python\Python310\Lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\darife\AppData\Local\Programs\Python\Python310\Lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\darife\AppData\Local\Programs\Python\Python310\Lib\site-packages\j1939\electronic_control_unit.py", line 313, in _async_job_thread
pythoncom.CoUnitialize()
AttributeError: module 'pythoncom' has no attribute 'CoUnitialize'. Did you mean: 'CoInitialize'?
I saw @GraysonNocera mentioned about calling the 'CoUnitialize' method in his ticket #39 . Any ideas why this worked but I'm getting an error on my end?
Pip says I'm using can-j1939==2.0.12
The text was updated successfully, but these errors were encountered:
Hi,
I'm using can-j1939==2.0.12 and had the same error message. The problem is a typo in electronic_control_unit.py line 313, where it says pythoncom.CoUnitialize().
Pythoncom only has CoUninitialize(), so by changing this line to pythoncom.CoUninitialize() the bug is fixed.
I wonder if there is any kind of unit test we can write to verify things are, and stay, working. Perhaps this can be achieved by introducing a unit test into test_ecu.py which calls feeder.stop() method (which in turn will call stop() of its wrapped ecu instance, seems like - I don't see any unit test currently that exercises the stop() method of class ElectronicControlUnit.)
I'm developing a C++ application and using Pybind11 to reference the j1939 library. When calling the stop method of the ecu, I'm getting the following:
I saw @GraysonNocera mentioned about calling the 'CoUnitialize' method in his ticket #39 . Any ideas why this worked but I'm getting an error on my end?
Pip says I'm using can-j1939==2.0.12
The text was updated successfully, but these errors were encountered: