python - py2exe错误: "Error in atexit._run_exitfuncs:Error in sys.exitfunc:"

标签 python windows pyqt4 py2exe

我正在尝试使用 py2exe 将我的 pyqt 应用程序包装到 Windows 可执行文件中。我能够很好地生成 exe,但是在运行它时,它给出了一个我不知道的错误。

这是我的 setup.py:

from distutils.core import setup
import py2exe

setup(name="dcm",
      version="0.1",
      author="xyz",
      license="GNU General Public License (GPL)",
      windows=[{"script": "du.py"}],
      options={"py2exe": {"skip_archive": True,"packages": ["sip","colorama", "xml.etree.ElementTree"], "includes": ["PyQt4.QtGui","urllib2","gzip","datetime","sqlite3","csv","os","errno","shutil","fileinput","hashlib","ftplib"]}})

这是非常详细的错误日志:

# trying C:\dev\dcm\dist\.\atexit.pyd
# trying C:\dev\dcm\dist\.\atexit.py
# trying C:\dev\dcm\dist\.\atexit.pyw
# trying C:\dev\dcm\dist\.\atexit.pyc
import atexit # precompiled from C:\dev\dcm\dist\.\atexit.pyc
# trying C:\dev\dcm\dist\.\linecache.pyd
# trying C:\dev\dcm\dist\.\linecache.py
# trying C:\dev\dcm\dist\.\linecache.pyw
# trying C:\dev\dcm\dist\.\linecache.pyc
import linecache # precompiled from C:\dev\dcm\dist\.\linecache.pyc
# trying C:\dev\dcm\dist\.\os.pyd
# trying C:\dev\dcm\dist\.\os.py
# trying C:\dev\dcm\dist\.\os.pyw
# trying C:\dev\dcm\dist\.\os.pyc
import os # precompiled from C:\dev\dcm\dist\.\os.pyc
import errno # builtin
import nt # builtin
# trying C:\dev\dcm\dist\.\ntpath.pyd
# trying C:\dev\dcm\dist\.\ntpath.py
# trying C:\dev\dcm\dist\.\ntpath.pyw
# trying C:\dev\dcm\dist\.\ntpath.pyc
import ntpath # precompiled from C:\dev\dcm\dist\.\ntpath.pyc
# trying C:\dev\dcm\dist\.\stat.pyd
# trying C:\dev\dcm\dist\.\stat.py
# trying C:\dev\dcm\dist\.\stat.pyw
# trying C:\dev\dcm\dist\.\stat.pyc
import stat # precompiled from C:\dev\dcm\dist\.\stat.pyc
# trying C:\dev\dcm\dist\.\genericpath.pyd
# trying C:\dev\dcm\dist\.\genericpath.py
# trying C:\dev\dcm\dist\.\genericpath.pyw
# trying C:\dev\dcm\dist\.\genericpath.pyc
import genericpath # precompiled from C:\dev\dcm\dist\.\genericpath.pyc
# trying C:\dev\dcm\dist\.\warnings.pyd
# trying C:\dev\dcm\dist\.\warnings.py
# trying C:\dev\dcm\dist\.\warnings.pyw
# trying C:\dev\dcm\dist\.\warnings.pyc
import warnings # precompiled from C:\dev\dcm\dist\.\warnings.pyc
# trying C:\dev\dcm\dist\.\types.pyd
# trying C:\dev\dcm\dist\.\types.py
# trying C:\dev\dcm\dist\.\types.pyw
# trying C:\dev\dcm\dist\.\types.pyc
import types # precompiled from C:\dev\dcm\dist\.\types.pyc
# trying C:\dev\dcm\dist\.\UserDict.pyd
# trying C:\dev\dcm\dist\.\UserDict.py
# trying C:\dev\dcm\dist\.\UserDict.pyw
# trying C:\dev\dcm\dist\.\UserDict.pyc
import UserDict # precompiled from C:\dev\dcm\dist\.\UserDict.pyc
# trying C:\dev\dcm\dist\.\_abcoll.pyd
# trying C:\dev\dcm\dist\.\_abcoll.py
# trying C:\dev\dcm\dist\.\_abcoll.pyw
# trying C:\dev\dcm\dist\.\_abcoll.pyc
import _abcoll # precompiled from C:\dev\dcm\dist\.\_abcoll.pyc
# trying C:\dev\dcm\dist\.\abc.pyd
# trying C:\dev\dcm\dist\.\abc.py
# trying C:\dev\dcm\dist\.\abc.pyw
# trying C:\dev\dcm\dist\.\abc.pyc
import abc # precompiled from C:\dev\dcm\dist\.\abc.pyc
# trying C:\dev\dcm\dist\.\_weakrefset.pyd
# trying C:\dev\dcm\dist\.\_weakrefset.py
# trying C:\dev\dcm\dist\.\_weakrefset.pyw
# trying C:\dev\dcm\dist\.\_weakrefset.pyc
import _weakrefset # precompiled from C:\dev\dcm\dist\.\_weakrefset.pyc
import _weakref # builtin
# trying C:\dev\dcm\dist\.\copy_reg.pyd
# trying C:\dev\dcm\dist\.\copy_reg.py
# trying C:\dev\dcm\dist\.\copy_reg.pyw
# trying C:\dev\dcm\dist\.\copy_reg.pyc
import copy_reg # precompiled from C:\dev\dcm\dist\.\copy_reg.pyc
# trying C:\dev\dcm\dist\.\urllib2.pyd
# trying C:\dev\dcm\dist\.\urllib2.py
# trying C:\dev\dcm\dist\.\urllib2.pyw
# trying C:\dev\dcm\dist\.\urllib2.pyc
import urllib2 # precompiled from C:\dev\dcm\dist\.\urllib2.pyc
# trying C:\dev\dcm\dist\.\base64.pyd
# trying C:\dev\dcm\dist\.\base64.py
# trying C:\dev\dcm\dist\.\base64.pyw
# trying C:\dev\dcm\dist\.\base64.pyc
import base64 # precompiled from C:\dev\dcm\dist\.\base64.pyc
# trying C:\dev\dcm\dist\.\re.pyd
# trying C:\dev\dcm\dist\.\re.py
# trying C:\dev\dcm\dist\.\re.pyw
# trying C:\dev\dcm\dist\.\re.pyc
import re # precompiled from C:\dev\dcm\dist\.\re.pyc
# trying C:\dev\dcm\dist\.\sre_compile.pyd
# trying C:\dev\dcm\dist\.\sre_compile.py
# trying C:\dev\dcm\dist\.\sre_compile.pyw
# trying C:\dev\dcm\dist\.\sre_compile.pyc
import sre_compile # precompiled from C:\dev\dcm\dist\.\sre_compile.pyc
import _sre # builtin
# trying C:\dev\dcm\dist\.\sre_parse.pyd
# trying C:\dev\dcm\dist\.\sre_parse.py
# trying C:\dev\dcm\dist\.\sre_parse.pyw
# trying C:\dev\dcm\dist\.\sre_parse.pyc
import sre_parse # precompiled from C:\dev\dcm\dist\.\sre_parse.pyc
# trying C:\dev\dcm\dist\.\sre_constants.pyd
# trying C:\dev\dcm\dist\.\sre_constants.py
# trying C:\dev\dcm\dist\.\sre_constants.pyw
# trying C:\dev\dcm\dist\.\sre_constants.pyc
import sre_constants # precompiled from C:\dev\dcm\dist\.\sre_constants.pyc
# trying C:\dev\dcm\dist\.\struct.pyd
# trying C:\dev\dcm\dist\.\struct.py
# trying C:\dev\dcm\dist\.\struct.pyw
# trying C:\dev\dcm\dist\.\struct.pyc
import struct # precompiled from C:\dev\dcm\dist\.\struct.pyc
import _struct # builtin
import binascii # builtin
# trying C:\dev\dcm\dist\.\hashlib.pyd
# trying C:\dev\dcm\dist\.\hashlib.py
# trying C:\dev\dcm\dist\.\hashlib.pyw
# trying C:\dev\dcm\dist\.\hashlib.pyc
import hashlib # precompiled from C:\dev\dcm\dist\.\hashlib.pyc
# trying C:\dev\dcm\dist\.\_hashlib.pyd
import _hashlib # dynamically loaded from C:\dev\dcm\dist\.\_hashlib.pyd
# trying C:\dev\dcm\dist\.\httplib.pyd
# trying C:\dev\dcm\dist\.\httplib.py
# trying C:\dev\dcm\dist\.\httplib.pyw
# trying C:\dev\dcm\dist\.\httplib.pyc
import httplib # precompiled from C:\dev\dcm\dist\.\httplib.pyc
import array # builtin
# trying C:\dev\dcm\dist\.\socket.pyd
# trying C:\dev\dcm\dist\.\socket.py
# trying C:\dev\dcm\dist\.\socket.pyw
# trying C:\dev\dcm\dist\.\socket.pyc
import socket # precompiled from C:\dev\dcm\dist\.\socket.pyc
# trying C:\dev\dcm\dist\.\_socket.pyd
import _socket # dynamically loaded from C:\dev\dcm\dist\.\_socket.pyd
# trying C:\dev\dcm\dist\.\functools.pyd
# trying C:\dev\dcm\dist\.\functools.py
# trying C:\dev\dcm\dist\.\functools.pyw
# trying C:\dev\dcm\dist\.\functools.pyc
import functools # precompiled from C:\dev\dcm\dist\.\functools.pyc
import _functools # builtin
# trying C:\dev\dcm\dist\.\_ssl.pyd
import _ssl # dynamically loaded from C:\dev\dcm\dist\.\_ssl.pyd
import cStringIO # builtin
# trying C:\dev\dcm\dist\.\urlparse.pyd
# trying C:\dev\dcm\dist\.\urlparse.py
# trying C:\dev\dcm\dist\.\urlparse.pyw
# trying C:\dev\dcm\dist\.\urlparse.pyc
import urlparse # precompiled from C:\dev\dcm\dist\.\urlparse.pyc
# trying C:\dev\dcm\dist\.\collections.pyd
# trying C:\dev\dcm\dist\.\collections.py
# trying C:\dev\dcm\dist\.\collections.pyw
# trying C:\dev\dcm\dist\.\collections.pyc
import collections # precompiled from C:\dev\dcm\dist\.\collections.pyc
import _collections # builtin
import operator # builtin
# trying C:\dev\dcm\dist\.\keyword.pyd
# trying C:\dev\dcm\dist\.\keyword.py
# trying C:\dev\dcm\dist\.\keyword.pyw
# trying C:\dev\dcm\dist\.\keyword.pyc
import keyword # precompiled from C:\dev\dcm\dist\.\keyword.pyc
# trying C:\dev\dcm\dist\.\heapq.pyd
# trying C:\dev\dcm\dist\.\heapq.py
# trying C:\dev\dcm\dist\.\heapq.pyw
# trying C:\dev\dcm\dist\.\heapq.pyc
import heapq # precompiled from C:\dev\dcm\dist\.\heapq.pyc
import itertools # builtin
import _heapq # builtin
import thread # builtin
# trying C:\dev\dcm\dist\.\mimetools.pyd
# trying C:\dev\dcm\dist\.\mimetools.py
# trying C:\dev\dcm\dist\.\mimetools.pyw
# trying C:\dev\dcm\dist\.\mimetools.pyc
import mimetools # precompiled from C:\dev\dcm\dist\.\mimetools.pyc
# trying C:\dev\dcm\dist\.\tempfile.pyd
# trying C:\dev\dcm\dist\.\tempfile.py
# trying C:\dev\dcm\dist\.\tempfile.pyw
# trying C:\dev\dcm\dist\.\tempfile.pyc
import tempfile # precompiled from C:\dev\dcm\dist\.\tempfile.pyc
# trying C:\dev\dcm\dist\.\io.pyd
# trying C:\dev\dcm\dist\.\io.py
# trying C:\dev\dcm\dist\.\io.pyw
# trying C:\dev\dcm\dist\.\io.pyc
import io # precompiled from C:\dev\dcm\dist\.\io.pyc
import _io # builtin
# trying C:\dev\dcm\dist\.\random.pyd
# trying C:\dev\dcm\dist\.\random.py
# trying C:\dev\dcm\dist\.\random.pyw
# trying C:\dev\dcm\dist\.\random.pyc
import random # precompiled from C:\dev\dcm\dist\.\random.pyc
# trying C:\dev\dcm\dist\.\__future__.pyd
# trying C:\dev\dcm\dist\.\__future__.py
# trying C:\dev\dcm\dist\.\__future__.pyw
# trying C:\dev\dcm\dist\.\__future__.pyc
import __future__ # precompiled from C:\dev\dcm\dist\.\__future__.pyc
import math # builtin
import _random # builtin
# trying C:\dev\dcm\dist\.\fcntl.pyd
# trying C:\dev\dcm\dist\.\fcntl.py
# trying C:\dev\dcm\dist\.\fcntl.pyw
# trying C:\dev\dcm\dist\.\fcntl.pyc
# trying C:\dev\dcm\dist\.\rfc822.pyd
# trying C:\dev\dcm\dist\.\rfc822.py
# trying C:\dev\dcm\dist\.\rfc822.pyw
# trying C:\dev\dcm\dist\.\rfc822.pyc
import rfc822 # precompiled from C:\dev\dcm\dist\.\rfc822.pyc
import time # builtin
# trying C:\dev\dcm\dist\.\ssl.pyd
# trying C:\dev\dcm\dist\.\ssl.py
# trying C:\dev\dcm\dist\.\ssl.pyw
# trying C:\dev\dcm\dist\.\ssl.pyc
import ssl # precompiled from C:\dev\dcm\dist\.\ssl.pyc
# trying C:\dev\dcm\dist\.\textwrap.pyd
# trying C:\dev\dcm\dist\.\textwrap.py
# trying C:\dev\dcm\dist\.\textwrap.pyw
# trying C:\dev\dcm\dist\.\textwrap.pyc
import textwrap # precompiled from C:\dev\dcm\dist\.\textwrap.pyc
# trying C:\dev\dcm\dist\.\string.pyd
# trying C:\dev\dcm\dist\.\string.py
# trying C:\dev\dcm\dist\.\string.pyw
# trying C:\dev\dcm\dist\.\string.pyc
import string # precompiled from C:\dev\dcm\dist\.\string.pyc
import strop # builtin
# trying C:\dev\dcm\dist\.\posixpath.pyd
# trying C:\dev\dcm\dist\.\posixpath.py
# trying C:\dev\dcm\dist\.\posixpath.pyw
# trying C:\dev\dcm\dist\.\posixpath.pyc
import posixpath # precompiled from C:\dev\dcm\dist\.\posixpath.pyc
# trying C:\dev\dcm\dist\.\bisect.pyd
# trying C:\dev\dcm\dist\.\bisect.py
# trying C:\dev\dcm\dist\.\bisect.pyw
# trying C:\dev\dcm\dist\.\bisect.pyc
import bisect # precompiled from C:\dev\dcm\dist\.\bisect.pyc
import _bisect # builtin
# trying C:\dev\dcm\dist\.\urllib.pyd
# trying C:\dev\dcm\dist\.\urllib.py
# trying C:\dev\dcm\dist\.\urllib.pyw
# trying C:\dev\dcm\dist\.\urllib.pyc
import urllib # precompiled from C:\dev\dcm\dist\.\urllib.pyc
# trying C:\dev\dcm\dist\.\nturl2path.pyd
# trying C:\dev\dcm\dist\.\nturl2path.py
# trying C:\dev\dcm\dist\.\nturl2path.pyw
# trying C:\dev\dcm\dist\.\nturl2path.pyc
import nturl2path # precompiled from C:\dev\dcm\dist\.\nturl2path.pyc
# trying C:\dev\dcm\dist\.\gzip.pyd
# trying C:\dev\dcm\dist\.\gzip.py
# trying C:\dev\dcm\dist\.\gzip.pyw
# trying C:\dev\dcm\dist\.\gzip.pyc
import gzip # precompiled from C:\dev\dcm\dist\.\gzip.pyc
import zlib # builtin
import colorama # directory C:\dev\dcm\dist\.\colorama
# trying C:\dev\dcm\dist\.\colorama\__init__.pyd
# trying C:\dev\dcm\dist\.\colorama\__init__.py
# trying C:\dev\dcm\dist\.\colorama\__init__.pyw
# trying C:\dev\dcm\dist\.\colorama\__init__.pyc
import colorama # precompiled from C:\dev\dcm\dist\.\colorama\__init__.pyc
# trying C:\dev\dcm\dist\.\colorama\initialise.pyd
# trying C:\dev\dcm\dist\.\colorama\initialise.py
# trying C:\dev\dcm\dist\.\colorama\initialise.pyw
# trying C:\dev\dcm\dist\.\colorama\initialise.pyc
import colorama.initialise # precompiled from C:\dev\dcm\dist\.\colorama\initialise.pyc
# trying C:\dev\dcm\dist\.\colorama\atexit.pyd
# trying C:\dev\dcm\dist\.\colorama\atexit.py
# trying C:\dev\dcm\dist\.\colorama\atexit.pyw
# trying C:\dev\dcm\dist\.\colorama\atexit.pyc
# trying C:\dev\dcm\dist\.\colorama\sys.pyd
# trying C:\dev\dcm\dist\.\colorama\sys.py
# trying C:\dev\dcm\dist\.\colorama\sys.pyw
# trying C:\dev\dcm\dist\.\colorama\sys.pyc
# trying C:\dev\dcm\dist\.\colorama\ansitowin32.pyd
# trying C:\dev\dcm\dist\.\colorama\ansitowin32.py
# trying C:\dev\dcm\dist\.\colorama\ansitowin32.pyw
# trying C:\dev\dcm\dist\.\colorama\ansitowin32.pyc
import colorama.ansitowin32 # precompiled from C:\dev\dcm\dist\.\colorama\ansitowin32.pyc
# trying C:\dev\dcm\dist\.\colorama\re.pyd
# trying C:\dev\dcm\dist\.\colorama\re.py
# trying C:\dev\dcm\dist\.\colorama\re.pyw
# trying C:\dev\dcm\dist\.\colorama\re.pyc
# trying C:\dev\dcm\dist\.\colorama\ansi.pyd
# trying C:\dev\dcm\dist\.\colorama\ansi.py
# trying C:\dev\dcm\dist\.\colorama\ansi.pyw
# trying C:\dev\dcm\dist\.\colorama\ansi.pyc
import colorama.ansi # precompiled from C:\dev\dcm\dist\.\colorama\ansi.pyc
# trying C:\dev\dcm\dist\.\colorama\winterm.pyd
# trying C:\dev\dcm\dist\.\colorama\winterm.py
# trying C:\dev\dcm\dist\.\colorama\winterm.pyw
# trying C:\dev\dcm\dist\.\colorama\winterm.pyc
import colorama.winterm # precompiled from C:\dev\dcm\dist\.\colorama\winterm.pyc
# trying C:\dev\dcm\dist\.\colorama\win32.pyd
# trying C:\dev\dcm\dist\.\colorama\win32.py
# trying C:\dev\dcm\dist\.\colorama\win32.pyw
# trying C:\dev\dcm\dist\.\colorama\win32.pyc
import colorama.win32 # precompiled from C:\dev\dcm\dist\.\colorama\win32.pyc
# trying C:\dev\dcm\dist\.\colorama\ctypes.pyd
# trying C:\dev\dcm\dist\.\colorama\ctypes.py
# trying C:\dev\dcm\dist\.\colorama\ctypes.pyw
# trying C:\dev\dcm\dist\.\colorama\ctypes.pyc
import ctypes # directory C:\dev\dcm\dist\.\ctypes
# trying C:\dev\dcm\dist\.\ctypes\__init__.pyd
# trying C:\dev\dcm\dist\.\ctypes\__init__.py
# trying C:\dev\dcm\dist\.\ctypes\__init__.pyw
# trying C:\dev\dcm\dist\.\ctypes\__init__.pyc
import ctypes # precompiled from C:\dev\dcm\dist\.\ctypes\__init__.pyc
# trying C:\dev\dcm\dist\.\ctypes\os.pyd
# trying C:\dev\dcm\dist\.\ctypes\os.py
# trying C:\dev\dcm\dist\.\ctypes\os.pyw
# trying C:\dev\dcm\dist\.\ctypes\os.pyc
# trying C:\dev\dcm\dist\.\ctypes\sys.pyd
# trying C:\dev\dcm\dist\.\ctypes\sys.py
# trying C:\dev\dcm\dist\.\ctypes\sys.pyw
# trying C:\dev\dcm\dist\.\ctypes\sys.pyc
# trying C:\dev\dcm\dist\.\ctypes\_ctypes.pyd
# trying C:\dev\dcm\dist\.\ctypes\_ctypes.py
# trying C:\dev\dcm\dist\.\ctypes\_ctypes.pyw
# trying C:\dev\dcm\dist\.\ctypes\_ctypes.pyc
# trying C:\dev\dcm\dist\.\_ctypes.pyd
import _ctypes # dynamically loaded from C:\dev\dcm\dist\.\_ctypes.pyd
# trying C:\dev\dcm\dist\.\ctypes\struct.pyd
# trying C:\dev\dcm\dist\.\ctypes\struct.py
# trying C:\dev\dcm\dist\.\ctypes\struct.pyw
# trying C:\dev\dcm\dist\.\ctypes\struct.pyc
# trying C:\dev\dcm\dist\.\ctypes\ctypes.pyd
# trying C:\dev\dcm\dist\.\ctypes\ctypes.py
# trying C:\dev\dcm\dist\.\ctypes\ctypes.pyw
# trying C:\dev\dcm\dist\.\ctypes\ctypes.pyc
# trying C:\dev\dcm\dist\.\ctypes\_endian.pyd
# trying C:\dev\dcm\dist\.\ctypes\_endian.py
# trying C:\dev\dcm\dist\.\ctypes\_endian.pyw
# trying C:\dev\dcm\dist\.\ctypes\_endian.pyc
import ctypes._endian # precompiled from C:\dev\dcm\dist\.\ctypes\_endian.pyc
# trying C:\dev\dcm\dist\.\ctypes\wintypes.pyd
# trying C:\dev\dcm\dist\.\ctypes\wintypes.py
# trying C:\dev\dcm\dist\.\ctypes\wintypes.pyw
# trying C:\dev\dcm\dist\.\ctypes\wintypes.pyc
import ctypes.wintypes # precompiled from C:\dev\dcm\dist\.\ctypes\wintypes.pyc
import PyQt4 # directory C:\dev\dcm\dist\.\PyQt4
# trying C:\dev\dcm\dist\.\PyQt4\__init__.pyd
# trying C:\dev\dcm\dist\.\PyQt4\__init__.py
# trying C:\dev\dcm\dist\.\PyQt4\__init__.pyw
# trying C:\dev\dcm\dist\.\PyQt4\__init__.pyc
import PyQt4 # precompiled from C:\dev\dcm\dist\.\PyQt4\__init__.pyc
# trying C:\dev\dcm\dist\.\PyQt4\QtGui.pyd
# trying C:\dev\dcm\dist\.\PyQt4\QtGui.py
# trying C:\dev\dcm\dist\.\PyQt4\QtGui.pyw
# trying C:\dev\dcm\dist\.\PyQt4\QtGui.pyc
import PyQt4.QtGui # precompiled from C:\dev\dcm\dist\.\PyQt4\QtGui.pyc
# trying C:\dev\dcm\dist\.\PyQt4\imp.pyd
# trying C:\dev\dcm\dist\.\PyQt4\imp.py
# trying C:\dev\dcm\dist\.\PyQt4\imp.pyw
# trying C:\dev\dcm\dist\.\PyQt4\imp.pyc
import imp # builtin
# trying C:\dev\dcm\dist\.\PyQt4\os.pyd
# trying C:\dev\dcm\dist\.\PyQt4\os.py
# trying C:\dev\dcm\dist\.\PyQt4\os.pyw
# trying C:\dev\dcm\dist\.\PyQt4\os.pyc
# trying C:\dev\dcm\dist\.\PyQt4\sys.pyd
# trying C:\dev\dcm\dist\.\PyQt4\sys.py
# trying C:\dev\dcm\dist\.\PyQt4\sys.pyw
# trying C:\dev\dcm\dist\.\PyQt4\sys.pyc
# trying C:\dev\dcm\dist\.\sip.pyd
import sip # dynamically loaded from C:\dev\dcm\dist\.\sip.pyd
# trying C:\dev\dcm\dist\.\PyQt4\QtCore.pyd
# trying C:\dev\dcm\dist\.\PyQt4\QtCore.py
# trying C:\dev\dcm\dist\.\PyQt4\QtCore.pyw
# trying C:\dev\dcm\dist\.\PyQt4\QtCore.pyc
import PyQt4.QtCore # precompiled from C:\dev\dcm\dist\.\PyQt4\QtCore.pyc
import PyQt4.QtCore # dynamically loaded from C:\dev\dcm\dist\PyQt4.QtCore.pyd
import PyQt4.QtGui # dynamically loaded from C:\dev\dcm\dist\PyQt4.QtGui.pyd
# trying C:\dev\dcm\dist\.\fileinput.pyd
# trying C:\dev\dcm\dist\.\fileinput.py
# trying C:\dev\dcm\dist\.\fileinput.pyw
# trying C:\dev\dcm\dist\.\fileinput.pyc
import fileinput # precompiled from C:\dev\dcm\dist\.\fileinput.pyc
import xml # directory C:\dev\dcm\dist\.\xml
# trying C:\dev\dcm\dist\.\xml\__init__.pyd
# trying C:\dev\dcm\dist\.\xml\__init__.py
# trying C:\dev\dcm\dist\.\xml\__init__.pyw
# trying C:\dev\dcm\dist\.\xml\__init__.pyc
import xml # precompiled from C:\dev\dcm\dist\.\xml\__init__.pyc
# trying C:\dev\dcm\dist\.\xml\_xmlplus.pyd
# trying C:\dev\dcm\dist\.\xml\_xmlplus.py
# trying C:\dev\dcm\dist\.\xml\_xmlplus.pyw
# trying C:\dev\dcm\dist\.\xml\_xmlplus.pyc
# trying C:\dev\dcm\dist\.\_xmlplus.pyd
# trying C:\dev\dcm\dist\.\_xmlplus.py
# trying C:\dev\dcm\dist\.\_xmlplus.pyw
# trying C:\dev\dcm\dist\.\_xmlplus.pyc
import xml.etree # directory C:\dev\dcm\dist\.\xml\etree
# trying C:\dev\dcm\dist\.\xml\etree\__init__.pyd
# trying C:\dev\dcm\dist\.\xml\etree\__init__.py
# trying C:\dev\dcm\dist\.\xml\etree\__init__.pyw
# trying C:\dev\dcm\dist\.\xml\etree\__init__.pyc
import xml.etree # precompiled from C:\dev\dcm\dist\.\xml\etree\__init__.pyc
# trying C:\dev\dcm\dist\.\xml\etree\ElementTree.pyd
# trying C:\dev\dcm\dist\.\xml\etree\ElementTree.py
# trying C:\dev\dcm\dist\.\xml\etree\ElementTree.pyw
# trying C:\dev\dcm\dist\.\xml\etree\ElementTree.pyc
import xml.etree.ElementTree # precompiled from C:\dev\dcm\dist\.\xml\etree\ElementTree.pyc
# trying C:\dev\dcm\dist\.\xml\etree\sys.pyd
# trying C:\dev\dcm\dist\.\xml\etree\sys.py
# trying C:\dev\dcm\dist\.\xml\etree\sys.pyw
# trying C:\dev\dcm\dist\.\xml\etree\sys.pyc
# trying C:\dev\dcm\dist\.\xml\etree\re.pyd
# trying C:\dev\dcm\dist\.\xml\etree\re.py
# trying C:\dev\dcm\dist\.\xml\etree\re.pyw
# trying C:\dev\dcm\dist\.\xml\etree\re.pyc
# trying C:\dev\dcm\dist\.\xml\etree\warnings.pyd
# trying C:\dev\dcm\dist\.\xml\etree\warnings.py
# trying C:\dev\dcm\dist\.\xml\etree\warnings.pyw
# trying C:\dev\dcm\dist\.\xml\etree\warnings.pyc
# trying C:\dev\dcm\dist\.\xml\etree\ElementPath.pyd
# trying C:\dev\dcm\dist\.\xml\etree\ElementPath.py
# trying C:\dev\dcm\dist\.\xml\etree\ElementPath.pyw
# trying C:\dev\dcm\dist\.\xml\etree\ElementPath.pyc
import xml.etree.ElementPath # precompiled from C:\dev\dcm\dist\.\xml\etree\ElementPath.pyc
# trying C:\dev\dcm\dist\.\xml\etree\ElementC14N.pyd
# trying C:\dev\dcm\dist\.\xml\etree\ElementC14N.py
# trying C:\dev\dcm\dist\.\xml\etree\ElementC14N.pyw
# trying C:\dev\dcm\dist\.\xml\etree\ElementC14N.pyc
# trying C:\dev\dcm\dist\.\ElementC14N.pyd
# trying C:\dev\dcm\dist\.\ElementC14N.py
# trying C:\dev\dcm\dist\.\ElementC14N.pyw
# trying C:\dev\dcm\dist\.\ElementC14N.pyc
# trying C:\dev\dcm\dist\.\ftplib.pyd
# trying C:\dev\dcm\dist\.\ftplib.py
# trying C:\dev\dcm\dist\.\ftplib.pyw
# trying C:\dev\dcm\dist\.\ftplib.pyc
import ftplib # precompiled from C:\dev\dcm\dist\.\ftplib.pyc
# trying C:\dev\dcm\dist\.\SOCKS.pyd
# trying C:\dev\dcm\dist\.\SOCKS.py
# trying C:\dev\dcm\dist\.\SOCKS.pyw
# trying C:\dev\dcm\dist\.\SOCKS.pyc
# trying C:\dev\dcm\dist\.\initialize.pyd
# trying C:\dev\dcm\dist\.\initialize.py
# trying C:\dev\dcm\dist\.\initialize.pyw
# trying C:\dev\dcm\dist\.\initialize.pyc
import initialize # precompiled from C:\dev\dcm\dist\.\initialize.pyc
# trying C:\dev\dcm\dist\.\shutil.pyd
# trying C:\dev\dcm\dist\.\shutil.py
# trying C:\dev\dcm\dist\.\shutil.pyw
# trying C:\dev\dcm\dist\.\shutil.pyc
import shutil # precompiled from C:\dev\dcm\dist\.\shutil.pyc
# trying C:\dev\dcm\dist\.\fnmatch.pyd
# trying C:\dev\dcm\dist\.\fnmatch.py
# trying C:\dev\dcm\dist\.\fnmatch.pyw
# trying C:\dev\dcm\dist\.\fnmatch.pyc
import fnmatch # precompiled from C:\dev\dcm\dist\.\fnmatch.pyc
# trying C:\dev\dcm\dist\.\pwd.pyd
# trying C:\dev\dcm\dist\.\pwd.py
# trying C:\dev\dcm\dist\.\pwd.pyw
# trying C:\dev\dcm\dist\.\pwd.pyc
# trying C:\dev\dcm\dist\.\grp.pyd
# trying C:\dev\dcm\dist\.\grp.py
# trying C:\dev\dcm\dist\.\grp.pyw
# trying C:\dev\dcm\dist\.\grp.pyc
import datetime # builtin
import sqlite3 # directory C:\dev\dcm\dist\.\sqlite3
# trying C:\dev\dcm\dist\.\sqlite3\__init__.pyd
# trying C:\dev\dcm\dist\.\sqlite3\__init__.py
# trying C:\dev\dcm\dist\.\sqlite3\__init__.pyw
# trying C:\dev\dcm\dist\.\sqlite3\__init__.pyc
import sqlite3 # precompiled from C:\dev\dcm\dist\.\sqlite3\__init__.pyc
# trying C:\dev\dcm\dist\.\sqlite3\dbapi2.pyd
# trying C:\dev\dcm\dist\.\sqlite3\dbapi2.py
# trying C:\dev\dcm\dist\.\sqlite3\dbapi2.pyw
# trying C:\dev\dcm\dist\.\sqlite3\dbapi2.pyc
import sqlite3.dbapi2 # precompiled from C:\dev\dcm\dist\.\sqlite3\dbapi2.pyc
# trying C:\dev\dcm\dist\.\sqlite3\collections.pyd
# trying C:\dev\dcm\dist\.\sqlite3\collections.py
# trying C:\dev\dcm\dist\.\sqlite3\collections.pyw
# trying C:\dev\dcm\dist\.\sqlite3\collections.pyc
# trying C:\dev\dcm\dist\.\sqlite3\datetime.pyd
# trying C:\dev\dcm\dist\.\sqlite3\datetime.py
# trying C:\dev\dcm\dist\.\sqlite3\datetime.pyw
# trying C:\dev\dcm\dist\.\sqlite3\datetime.pyc
# trying C:\dev\dcm\dist\.\sqlite3\time.pyd
# trying C:\dev\dcm\dist\.\sqlite3\time.py
# trying C:\dev\dcm\dist\.\sqlite3\time.pyw
# trying C:\dev\dcm\dist\.\sqlite3\time.pyc
# trying C:\dev\dcm\dist\.\sqlite3\_sqlite3.pyd
# trying C:\dev\dcm\dist\.\sqlite3\_sqlite3.py
# trying C:\dev\dcm\dist\.\sqlite3\_sqlite3.pyw
# trying C:\dev\dcm\dist\.\sqlite3\_sqlite3.pyc
# trying C:\dev\dcm\dist\.\_sqlite3.pyd
import _sqlite3 # dynamically loaded from C:\dev\dcm\dist\.\_sqlite3.pyd
# trying C:\dev\dcm\dist\.\csv.pyd
# trying C:\dev\dcm\dist\.\csv.py
# trying C:\dev\dcm\dist\.\csv.pyw
# trying C:\dev\dcm\dist\.\csv.pyc
import csv # precompiled from C:\dev\dcm\dist\.\csv.pyc
import _csv # builtin
# trying C:\dev\dcm\dist\.\highlighter.pyd
# trying C:\dev\dcm\dist\.\highlighter.py
# trying C:\dev\dcm\dist\.\highlighter.pyw
# trying C:\dev\dcm\dist\.\highlighter.pyc
import highlighter # precompiled from C:\dev\dcm\dist\.\highlighter.pyc
# trying C:\dev\dcm\dist\.\removeDuplicateLines.pyd
# trying C:\dev\dcm\dist\.\removeDuplicateLines.py
# trying C:\dev\dcm\dist\.\removeDuplicateLines.pyw
# trying C:\dev\dcm\dist\.\removeDuplicateLines.pyc
import removeDuplicateLines # precompiled from C:\dev\dcm\dist\.\removeDuplicateLines.pyc
# trying C:\dev\dcm\dist\.\addChecksum.pyd
# trying C:\dev\dcm\dist\.\addChecksum.py
# trying C:\dev\dcm\dist\.\addChecksum.pyw
# trying C:\dev\dcm\dist\.\addChecksum.pyc
import addChecksum # precompiled from C:\dev\dcm\dist\.\addChecksum.pyc
# trying C:\dev\dcm\dist\.\mainwindow.pyd
# trying C:\dev\dcm\dist\.\mainwindow.py
# trying C:\dev\dcm\dist\.\mainwindow.pyw
# trying C:\dev\dcm\dist\.\mainwindow.pyc
import mainwindow # precompiled from C:\dev\dcm\dist\.\mainwindow.pyc
Traceback (most recent call last):
# trying C:\dev\dcm\dist\.\traceback.pyd
# trying C:\dev\dcm\dist\.\traceback.py
# trying C:\dev\dcm\dist\.\traceback.pyw
# trying C:\dev\dcm\dist\.\traceback.pyc
import traceback # precompiled from C:\dev\dcm\dist\.\traceback.pyc
Error in atexit._run_exitfuncs:Error in sys.exitfunc:
Traceback (most recent call last):
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr

关于可能导致此问题的原因(“atexit._run_exitfuncs 中的错误:sys.exitfunc 中的错误:”)或如何修复它有什么想法吗?

最佳答案

对于后代:

问题是我用于调试的脚本中几乎没有“打印”语句(该应用程序是在 Linux 上开发的)。但显然这些会导致 Windows 上出现上述错误。当我摆脱所有这些打印语句时,我的应用程序开始工作。

更新:哦,好吧,并不完美。即使我刚刚启动并关闭应用程序,日志文件仍然会给出相同的错误。该应用程序在启动后可以正常运行,但日志中的错误仍然让我烦恼。

关于python - py2exe错误: "Error in atexit._run_exitfuncs:Error in sys.exitfunc:",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24944780/

相关文章:

c++ - 获取特定监视器的处理程序以放置弹出窗口

python - 派生并为新添加的子项的索引设置颜色

python - 图论 : Finding all possible paths of 'n' length (with some constraints)

python - 查找对象python中变量的平均值

python - pygtk的Unicode问题

windows - 如何为 ReadFileEx() 的完成例程提供上下文信息?

windows - 无法使用 findstr 命令调用参数

python - 当我在 python pyqt 上关闭 gui 时,Qthread 仍在工作

c++ - Qt widget 背景从 Linux 到 Windows 不同

python - 在 Python 中将表/数据框与公共(public)列连接起来