python-can fails when using PCAN at newest version

Issue #74 resolved
Alex Eshoo created an issue

When I try to run a script using the PCAN device, I get an exception: File ".\can_test.py", line 4, in <module> bus = can.interface.Bus(bitrate = 125000) File "C:\Python27\lib\site-packages\can\interfaces\interface.py", line 48, in __new__ from can.interfaces.pcan import PcanBus File "C:\Python27\lib\site-packages\can\interfaces\pcan.py", line 10, in <module> from can.interfaces.PCANBasic import * File "C:\Python27\lib\site-packages\can\interfaces\PCANBasic.py", line 8, in <module> from can.interfaces.pcan_constants import * File "C:\Python27\lib\site-packages\can\interfaces\pcan_constants.py", line 5, in <module> TPCANHandle = c_ubyte # Represents a PCAN hardware channel handle NameError: name 'c_ubyte' is not defined

Comments (5)

  1. Brian Thorne repo owner

    Yeah it should - but I haven't cut a new release in a while. Are you installing python-can from pip or from source?

  2. luator

    Thanks for pointing this out. I have used the source from https://pypi.python.org/pypi/python-can which is version 1.5.0 (I didn't have success using pip under windows yet). Now I reinstalled it, using the newest revision from the "default" branch (version 1.5.1) and the error is gone :) So I guess this ticket can be closed.

  3. Log in to comment