1
0

More than 1 year has passed since last update.

canmatrixを含むasammdf のExe化

Posted at

asammdf を Exe化すると警告が表示される

asammdf GUIをExe化する をみると簡単にexe化できそうにみえるが、
Python-3.8.10、asammdf-7.3.2の場合、試すとこんな警告が出る。

arxml is not supported
csv is not supported
dbc is not supported
dbf is not supported
json is not supported
ldf is not supported
kcd is not supported
fibex is not supported
sym is not supported
xls is not supported
xlsx is not supported
yaml is not supported
scapy is not supported
wireshark is not supported
odx is not supported

Lib\site-packages\asammdf\gui\asammdfgui.py

import csv

と追記しても出続ける。import arxmlとかもエラー出るし。

警告が出る理由

canmatrix-0.9.5 が 悪さをしている。
canmatrix.formats.csv等を動的にimportしているが、pyinstaller で検出できず。
そもそもcsvではなく、canmatrix.formats.csv。。。

import canmatrix.formats.csv
import canmatrix.formats.arxml
import canmatrix.formats.dbc
import canmatrix.formats.dbf
import canmatrix.formats.json
import canmatrix.formats.ldf
import canmatrix.formats.kcd
import canmatrix.formats.fibex
import canmatrix.formats.sym
import canmatrix.formats.xls
import canmatrix.formats.xlsx
import canmatrix.formats.yaml
import canmatrix.formats.scapy
import canmatrix.formats.wireshark
import canmatrix.formats.odx

Lib\site-packages\asammdf\gui\asammdfgui.py に追記してExe化

Scripts\pyinstaller.exe Lib\site-packages\asammdf\gui\asammdfgui.py -w

無事にできたっぽい。--onefileを付けると、1ファイルになるが、起動時重い。。。

1
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0