I'm working on a project to read data from CAN bus ( Controller Area Network ). It's working well when I use the terminal, but when I try to create an application with pyinstaller it's not working anymore. I am using the Python-Can library, and my Hardware is from Vector.
import can
import binascii
import time
import logging
from PyQt5.QtCore import QThread
import matplotlib.pyplot as plt
class Bus_CAN(QThread):
def __init__(self,Logger,ID,channel,CW_Mode,Key_ID):
QThread.__init__(self)
self.Channel = channel
self.Result = []
try :
self.bus = can.interface.Bus( bustype='vector', channel = self.Channel)
self.Connected = True
print('CAN Connection OK !')
except :
self.Connected = False
print('CAN Connection error !')
When I launch this application directly from SublimeText the connection is OK, But when I build an application with pyinstaller the connection is not OK.
Thanks for your help.
EDIT : I'm using pyinstaller, not Py2exe