Матрица CAN - TypeError: Ни один объект типа не является итеративным - PullRequest
0 голосов
/ 24 июня 2019

Получение TypeError, когда файл конвертируется в exe, который выполняется в навигаторе Anaconda. Не уверен в зависимостях пакетов или проблемах преобразования exe.

код ошибки 1

Exception in Tkinter callback
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1699, in __call__
  File "Smart_Fn.py", line 244, in openFile
    convert(infile, outfile)
  File "Smart_Fn.py", line 80, in convert
    for name in dbs:
TypeError: 'NoneType' object is not iterable 

Фрагмент кода 2

 def convert(infile, out_file_name, **options):
        logger.info("Importing " + infile + " ... ")
        dbs = canmatrix.formats.loadp(infile, **options)
        logger.info("done\n")

        logger.info("Exporting " + out_file_name + " ... ")

        out_dbs = {}
        for name in dbs:
            db = None

            if 'ecus' in options and options['ecus'] is not None:
                ecu_list = options['ecus'].split(',')
                db = cm.CanMatrix()
                for ecu in ecu_list:
                    canmatrix.copy.copy_ecu_with_frames(ecu, dbs[name], db)
            if 'frames' in options and options['frames'] is not None:
                frame_list = options['frames'].split(',')
                db = cm.CanMatrix()
...