1
votes

I'm newbie in cx_freeze. I'm triing to make an executable from python 3.3 script that uses "time", "serial" and "tkinter". Cx_freeze run without any errors, but starting the exe file is resulting with error:

cannot import traceback module

Exception: No module named 're'

Original Exception: No module named 'serial'

I have this setup.py of cx_freeze

from cx_Freeze import setup, Executable

includes = ["serial", "tkinter"]
excludes = []
packages = []
path = []


GUI2Exe_Target_1 = Executable(
    # what to build
    script ='test6.1.py',
    initScript = None,
    base = 'Win32GUI',
    targetDir = r"dist",
    targetName = "bludiste2.exe",
    compress = True,
    copyDependentFiles = True,
    appendScriptToExe = False,
    appendScriptToLibrary = False,
    icon = None
    )

Does anyone know, how to solve it, please?

Thank you.

1

1 Answers

1
votes

The first two lines are a bug that will be fixed in the next version of cx_Freeze. If you stick an import re in your script, you'll see the correct error message.

The last line is your real problem - that means it didn't find the serial module when you froze it. Check where pyserial is installed on your computer.