python-can icon indicating copy to clipboard operation
python-can copied to clipboard

PCANBasic.TRACE_FILE_SEGMENTED error on macos (M1 architecture)

Open sebastianpfischer opened this issue 3 years ago • 2 comments

Describe the bug

            result = PCANBasic.PCANBasic().SetValue(
                getattr(PCANBasic, 'PCAN_USBBUS1'),
                PCANBasic.TRACE_FILE_SEGMENTED,
                PCANBasic.PCAN_PARAMETER_ON,
            )

return 65536 as error. It does only impact the logging of the trace, not the other APIs

To Reproduce

Maybe if you call https://github.com/eclipse/kiso-testing/blob/master/examples/uds.yaml

Error: 2022-09-22 12:05:23,938 [ERROR] cc_pcan_can:283: b'An unknown error has occurred' 2022-09-22 12:05:23,938 [ERROR] cc_pcan_can:254: Logging for PCAN_USBBUS1 not activated

Expected behavior

No error

Additional context

OS and version: macOS Monterey, 12.6 Python version: 3.10.6 python-can version: 4.0.0 python-can interface/s (if applicable): PCCANBASIC

sebastianpfischer avatar Sep 22 '22 11:09 sebastianpfischer

Have you tried running the logger script? Does the trace back include the function call you copied in?

j-c-cook avatar Sep 25 '22 13:09 j-c-cook

Hi @j-c-cook, the only place where TRACE_FILE_SEGMENTED is found is https://github.com/hardbyte/python-can/search?q=TRACE_FILE_SEGMENTED. Therefor, I think nobody really tested it.

We are using this SetValue with TRACE_FILE_SEGMENTED because our logs are getting big and we do not want to lose any information for post-analysis.

sebastianpfischer avatar Sep 26 '22 15:09 sebastianpfischer

I'm having trouble following what you're describing. Could you provide me with an example script? Which physical PCAN device are you using? Are you executing one of the Scripts, or is it a custom script?

j-c-cook avatar Dec 28 '22 21:12 j-c-cook