Vector hardware,no ack can not raise can.CanError
Describe the bug
HI,
I want to test the can transmit without ack,but it can raise can.CanError.

Additional context
Python version:3.7.9 python-can version: 3.3.4 python-can interface/s (if applicable): Vector CANcaseXL
import can
my_bus = can.interface.Bus(bustype='vector', channel='0,1', app_name='Python Can',bitrate=500000, receive_own_messages=False)
msg = can.Message(arbitration_id=0x123, data=[1, 2, 3, 4, 5, 6, 7, 8], channel="0,1",)
my_bus.send(msg, timeout=0.5)
You need a another device on the physical CAN bus to acknowledge your messages. Otherwise you have the option to use the Virtual Channel in Vector HW config. Then you don't need any receivers.
Would you mind posting your Traceback?
Hi, It didn't have Traceback,if use my way to send message.I think when the bus timeout,it will raise an error.
If I use the software:"Busmaster",it will raise an error,I don‘t know the diffrence between the "python-can" and "busmaster"

Sorry @XXIN0, but I do not understand how python-can comes into play here where the problem is that you want to report or get assistance with.
for example,if I don't connect any devices,when I send an can message,it will raise an error that tell me the send is not ok.
Which one of these options is your problem?
- You expect an error, but you don't get any.
- You expect no error, but you get can.CanError.
1 is my expect
Hi, having the same issue, I see there is no implementation in the python canlib for raising errors when sending can frames with Vector interface. Will this be resolved soon?
@XXIN0 I have found a work around, open the bus with receive_own_messages=True and use the receive function to get an error frame for an error on transmitted frames. I'm checking Vector's API to see how can we fix this issue, will let you know.
for CAN you can check Message.is_error_frame. I don't think there is a way to get the exact kind of error.
For CAN FD you can get the error type like this.
@zariiii9003 thanks, i didn't look on the latest version. I still think there should be a better way to get the Tx error on send function and not throw the receive function.
The send function just adds the message to the send queue. There should be no exception unless the driver says so. However, we could implement the rxErrorCounter and txErrorCounter, i think that would be useful. But there should be a common api for all interfaces.
@XXIN0 I have found a work around, open the bus with receive_own_messages=True and use the receive function to get an error frame for an error on transmitted frames. I'm checking Vector's API to see how can we fix this issue, will let you know.
@geynis Thanks,I'll try your suggestion.