[CAN]Python에서 PCANBasic 라이브러리 사용 시 문제 해결

2022. 6. 14. 20:19프로젝트 로그/테스트x솔루션 JIG 개발기

반응형

 

실행하려는 isotp_test.py와 PCANBasic.py를 같은 폴더에 넣고 수행하는 중, 아래와 같은 에러가 발생 하였고, PEAK-System 홈페이지에서 PEAK-Drivers를 다운로드 하여 재 설치하니 문제가 해결 되었다.

D:\Workspace\Phoenixon_Porject\canLFU_CPU1\Tool>python isotp_test.py    
Traceback (most recent call last):
  File "isotp_test.py", line 75, in <module>
    isoTpTester = ISO_TP_TESTER(args.can_if_num)
  File "isotp_test.py", line 14, in __init__
    self.objPCAN = PCANBasic()
  File "D:\Workspace\Phoenixon_Porject\canLFU_CPU1\Tool\PCANBasic.py", line 386, in __init__
    self.__m_dllBasic = windll.LoadLibrary("PCANBasic")
  File "D:\anaconda3\lib\ctypes\__init__.py", line 459, in LoadLibrary
    return self._dlltype(name)
  File "D:\anaconda3\lib\ctypes\__init__.py", line 381, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'PCANBasic' (or one of its dependencies). Try using the full path with constructor syntax.

 

드라이버 다운로드 경로는 아래와 같다.

https://www.peak-system.com/Drivers.523.0.html?&L=1 

 

Drivers: PEAK-System

Please select the correct device drivers for your operating system and PC interface. See the text below for additional information and help. Additional Information Device Driver Setup Windows® Installation packages with device drivers and tools for for ou

www.peak-system.com

 

 

참고 자료

https://forum.peak-system.com/viewtopic.php?t=3443 

 

PCAN Basic Example error - PEAK-System Forum

The free CAN Software API (Application Programming Interface) for Windows® suresheps Posts: 1 Joined: Thu 19. Sep 2019, 19:00 Post by suresheps » Thu 19. Sep 2019, 19:07 Hi, I Am trying to use PCAN Basic library. So stared with "PCANBasicExample.pyw" but

forum.peak-system.com

 

반응형