Hi
As isee this problem also occurs in visual studio (see here https://www.peak-system.com/forum/viewt ... =41&t=2697)
Is there any solution to this in python? I am using pycharm as IDE.
This is some how a show stopper as I need to restart the IDE each time.
Any solution?
Thx
CAN_initialize failing after 'Stop Debugging' in python
Re: CAN_initialize failing after 'Stop Debugging' in python
Hi,
which version of the PCANBasic.dll do you use?
regards
Michael
which version of the PCANBasic.dll do you use?
regards
Michael
Re: CAN_initialize failing after 'Stop Debugging' in python
Hi
I installed every Thing from the DVD which came With the pcan USB. Where so i See the version?
I installed every Thing from the DVD which came With the pcan USB. Where so i See the version?
Re: CAN_initialize failing after 'Stop Debugging' in python
When installing through our PeakOemDrv.exe setup, you will find the files in the Windows\system32 (64bit version) and Windows\syswow64 (32bit version) directory. Simply check the properties of both PCANBasic.dll files, to see the file version.
Re: CAN_initialize failing after 'Stop Debugging' in python
Thanks for the quick response.
I have version 4.3.0.150
I have version 4.3.0.150
Re: CAN_initialize failing after 'Stop Debugging' in python
Hello,
Though, if you just close the console, then the problem appears (without clicking stop or restart button).
Note: PCAN-Basic main condition is "one connection per process". As long as a PCAN-Basic channel is being used, and this is an active (valid) and working process, no other process can access the channel. You have to ensure that the debugging process is terminated, or that you call CAN_Uninitialize on the channel before terminating the debug-session. We cannot change this behavior within PCAN-Basic.
We don't use the IDE you mentioned (PyCharm), though we have installed it for testing and we think, it also retains the debugging process in background as Visual Studio does. When using the python console within PyCharm, the connection to PCANBasic is reset each time the console is stopped or restartedklaus2 wrote: I am using pycharm as IDE.
Though, if you just close the console, then the problem appears (without clicking stop or restart button).
please note that this problem doesn't occur when using the Python compiler and its own IDE. This problem is caused by features and enhancements of other IDEs like this you are using. We cannot see any configuration on PyCharm to avoid this behavior. Please look for a PyCharm forum and ask how to do this.klaus2 wrote:Is there any solution to this in python?
Note: PCAN-Basic main condition is "one connection per process". As long as a PCAN-Basic channel is being used, and this is an active (valid) and working process, no other process can access the channel. You have to ensure that the debugging process is terminated, or that you call CAN_Uninitialize on the channel before terminating the debug-session. We cannot change this behavior within PCAN-Basic.
Best regards,
Keneth
Keneth