executable broken - CentOS 7 / Python 3.3 / Requests 3.0

397 views
Skip to first unread message

ofir....@equalum.io

unread,
Nov 13, 2015, 3:44:41 AM11/13/15
to PyInstaller
Hi experts,
I'm a Python newbie, trying PyInstaller for the first time, running into some issues.
Reduced my issue to this simple test case:
import sys
import requests
try:
    r = requests.get('http://no.such.url/exists')
except requests.exceptions.ConnectionError as e:
    print ('invalid url');
    sys.exit(1)


Getting this error when running after compiling with PyInstaller (works well without it):
$ ./test
Traceback (most recent call last):
  File "<string>", line 4, in <module>
AttributeError: 'module' object has no attribute 'get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 5, in <module>
AttributeError: 'module' object has no attribute 'exceptions'
test returned -1


My environment is CentOS 7 64-bit, Python 3.3 from SCL, requests 2.8.1:
$ python --version
Python 3.3.2
$ pip list
docutils (0.11)
Jinja2 (2.6)
MarkupSafe (0.11)
nose (1.3.0)
pip (7.1.2)
Pygments (1.5)
PyInstaller (3.0)
requests (2.8.1)
setuptools (0.9.8)
simplejson (3.2.0)
Sphinx (1.1.3)
SQLAlchemy (0.7.9)
virtualenv (1.10.1)
$ cat /etc/centos-release
CentOS Linux release 7.1.1503 (Core)

Built the executable with:
pyinstaller --clean --onedir test.py

The warn.txt file is very big (see below).
Is that a known issue? How can I proceed / workaround (couldn't find a solution myself)
Thanks in advance,
   Ofir

$ cat build/test/warntest.txt
missing module named time.gmtime - imported by time, http.cookies
missing module named _datetime.__doc__ - imported by _datetime, datetime, /data/centos/eqagent_0.1.4/bin/test.py
missing module named 'org.python' - imported by pickle, /data/centos/eqagent_0.1.4/bin/test.py, xml.sax
missing module named 'org.python'.imp - imported by 'org.python', xml.sax
missing module named 'org.python'.PyStringMap - imported by 'org.python', pickle, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _collections.defaultdict - imported by _collections, collections, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _collections.deque - imported by _collections, collections, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _collections._count_elements - imported by _collections, collections, /data/centos/eqagent_0.1.4/bin/test.py
missing module named operator.eq - imported by operator, collections, /data/centos/eqagent_0.1.4/bin/test.py
missing module named operator.itemgetter - imported by operator, collections, simplejson.encoder, /data/centos/eqagent_0.1.4/bin/test.py
missing module named operator.attrgetter - imported by operator, inspect, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.release_lock - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.lock_held - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.init_builtin - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.init_frozen - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.is_frozen - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp._fix_co_filename - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.is_frozen_package - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.get_frozen_object - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.acquire_lock - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.is_builtin - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _imp.load_dynamic - imported by _imp, imp, /data/centos/eqagent_0.1.4/bin/test.py
excluded module named _frozen_importlib - imported by importlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named zipimport.zipimporter - imported by zipimport, pkgutil, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32api - imported by platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32api.RegQueryValueEx - imported by win32api, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32api.RegCloseKey - imported by win32api, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32api.RegOpenKeyEx - imported by win32api, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32api.GetVersionEx - imported by win32api, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32con - imported by platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32con.HKEY_LOCAL_MACHINE - imported by win32con, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32con.VER_NT_WORKSTATION - imported by win32con, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32con.VER_PLATFORM_WIN32_WINDOWS - imported by win32con, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named win32con.VER_PLATFORM_WIN32_NT - imported by win32con, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _gestalt - imported by platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _gestalt.gestalt - imported by _gestalt, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _scproxy._get_proxy_settings - imported by _scproxy, urllib.request
missing module named _scproxy._get_proxies - imported by _scproxy, urllib.request
missing module named _scproxy - imported by urllib.request
missing module named 'java.lang'.Exception - imported by 'java.lang', xml.sax._exceptions
missing module named xml.parsers.expat.ParserCreate - imported by xml.parsers.expat, plistlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named java - imported by platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named java.System - imported by java, platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named 'java.lang' - imported by platform, /data/centos/eqagent_0.1.4/bin/test.py, xml.sax._exceptions
missing module named vms_lib - imported by platform, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OPENSSL_VERSION - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OPENSSL_VERSION_INFO - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OPENSSL_VERSION_NUMBER - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl._SSLContext - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSLZeroReturnError - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSLEOFError - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSLWantReadError - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSLWantWriteError - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSLSyscallError - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSLError - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.CERT_NONE - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.CERT_OPTIONAL - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.CERT_REQUIRED - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_NO_SSLv3 - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_NO_SSLv2 - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_SINGLE_DH_USE - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_ALL - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_CIPHER_SERVER_PREFERENCE - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_NO_TLSv1 - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_NO_COMPRESSION - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.OP_SINGLE_ECDH_USE - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.RAND_status - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.RAND_pseudo_bytes - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.RAND_egd - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.RAND_add - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.RAND_bytes - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_EOF - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_WANT_WRITE - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_SYSCALL - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_ZERO_RETURN - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_WANT_X509_LOOKUP - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_INVALID_ERROR_CODE - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_WANT_READ - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_SSL - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.SSL_ERROR_WANT_CONNECT - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.HAS_NPN - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.HAS_SNI - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.HAS_ECDH - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.PROTOCOL_SSLv3 - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.PROTOCOL_SSLv23 - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.PROTOCOL_TLSv1 - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl._OPENSSL_API_VERSION - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _ssl.PROTOCOL_SSLv2 - imported by _ssl, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named winreg - imported by platform, mimetypes, urllib.request, /data/centos/eqagent_0.1.4/bin/test.py
missing module named grp.getgrnam - imported by grp, shutil, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _lzma._encode_filter_properties - imported by _lzma, lzma, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _lzma._decode_filter_properties - imported by _lzma, lzma, /data/centos/eqagent_0.1.4/bin/test.py
missing module named urllib.unquote_plus - imported by urllib, requests.compat
missing module named urllib.unquote - imported by urllib, requests.compat
missing module named urllib.getproxies - imported by urllib, requests.compat
missing module named urllib.quote_plus - imported by urllib, requests.compat
missing module named urllib.proxy_bypass - imported by urllib, requests.compat
missing module named urllib.quote - imported by urllib, requests.compat
missing module named urllib.urlencode - imported by urllib, requests.packages.urllib3.request, requests.compat
missing module named math.e - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.exp - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.pi - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.log - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.ceil - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.sqrt - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.acos - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.cos - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named math.sin - imported by math, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _sha1 - imported by hashlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _md5 - imported by hashlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _sha256 - imported by hashlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _sha512 - imported by hashlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named hashlib.sha256 - imported by hashlib, requests.packages.urllib3.util.ssl_
missing module named hashlib.sha1 - imported by hashlib, requests.packages.urllib3.util.ssl_, uuid
missing module named hashlib.md5 - imported by hashlib, requests.packages.urllib3.util.ssl_, uuid
missing module named hashlib.sha512 - imported by hashlib, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named pwd.getpwnam - imported by pwd, shutil, /data/centos/eqagent_0.1.4/bin/test.py
missing module named socket.getnameinfo - imported by socket, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named socket.error - imported by socket, ssl, requests.packages.urllib3.connectionpool, requests.packages.urllib3.connection, /data/centos/eqagent_0.1.4/bin/test.py
missing module named socket.SOCK_STREAM - imported by socket, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named socket.AF_INET - imported by socket, ssl, /data/centos/eqagent_0.1.4/bin/test.py
missing module named socket._fileobject - imported by socket, requests.packages.urllib3.contrib.pyopenssl
missing module named socket.timeout - imported by socket, requests.packages.urllib3.connectionpool, requests.packages.urllib3.connection, requests.packages.urllib3.response, requests.packages.urllib3.contrib.pyopenssl
missing module named unicodedata.ucd_3_2_0 - imported by unicodedata, stringprep, encodings.idna, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _dummy_threading - imported by dummy_threading, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _dummy_threading.__all__ - imported by _dummy_threading, dummy_threading, /data/centos/eqagent_0.1.4/bin/test.py
missing module named dummy_threading.RLock - imported by dummy_threading, bz2, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _bz2.BZ2Compressor - imported by _bz2, bz2, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _bz2.BZ2Decompressor - imported by _bz2, bz2, /data/centos/eqagent_0.1.4/bin/test.py
missing module named posix._exit - imported by posix, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named posix._have_functions - imported by posix, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named nt - imported by os, ntpath, shutil, /data/centos/eqagent_0.1.4/bin/test.py
missing module named nt._exit - imported by nt, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named nt._getfullpathname - imported by nt, ntpath, /data/centos/eqagent_0.1.4/bin/test.py
missing module named nt._getfinalpathname - imported by nt, ntpath, /data/centos/eqagent_0.1.4/bin/test.py
missing module named nt._getfileinformation - imported by nt, ntpath, /data/centos/eqagent_0.1.4/bin/test.py
missing module named nt._isdir - imported by nt, ntpath, /data/centos/eqagent_0.1.4/bin/test.py
missing module named nt._have_functions - imported by nt, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named os2 - imported by os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named os2._exit - imported by os2, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _emx_link - imported by os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _emx_link.link - imported by _emx_link, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named os2._have_functions - imported by os2, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named ce - imported by os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named ce._exit - imported by ce, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named ce._have_functions - imported by ce, os, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _warnings._onceregistry - imported by _warnings, warnings, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _warnings.warn_explicit - imported by _warnings, warnings, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _warnings.warn - imported by _warnings, warnings, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _warnings._defaultaction - imported by _warnings, warnings, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _warnings.filters - imported by _warnings, warnings, /data/centos/eqagent_0.1.4/bin/test.py
missing module named time.monotonic - imported by time, subprocess, threading, queue, /data/centos/eqagent_0.1.4/bin/test.py
missing module named time.time - imported by time, subprocess, threading, queue, http.cookies, /data/centos/eqagent_0.1.4/bin/test.py
missing module named time.sleep - imported by time, threading, /data/centos/eqagent_0.1.4/bin/test.py
missing module named threading.current_thread - imported by threading, _threading_local, /data/centos/eqagent_0.1.4/bin/test.py
missing module named threading.RLock - imported by threading, _threading_local, bz2, requests.packages.urllib3._collections, /data/centos/eqagent_0.1.4/bin/test.py
missing module named msvcrt - imported by subprocess, getpass, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi - imported by subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named select.select - imported by select, requests.packages.urllib3.util.connection
missing module named select.poll - imported by select, requests.packages.urllib3.util.connection
missing module named select.POLLIN - imported by select, requests.packages.urllib3.util.connection
missing module named _winapi.CREATE_NEW_PROCESS_GROUP - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi.CREATE_NEW_CONSOLE - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi.STD_ERROR_HANDLE - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi.STD_INPUT_HANDLE - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi.STARTF_USESHOWWINDOW - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi.SW_HIDE - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi.STARTF_USESTDHANDLES - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _winapi.STD_OUTPUT_HANDLE - imported by _winapi, subprocess, /data/centos/eqagent_0.1.4/bin/test.py
missing module named os.urandom - imported by os, random, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _struct._clearcache - imported by _struct, struct, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _struct.__doc__ - imported by _struct, struct, /data/centos/eqagent_0.1.4/bin/test.py
missing module named struct.calcsize - imported by struct, ctypes
missing module named errno.ENOENT - imported by errno, gettext, /data/centos/eqagent_0.1.4/bin/test.py
missing module named gettext.ngettext - imported by gettext, argparse, optparse, /data/centos/eqagent_0.1.4/bin/test.py
missing module named itertools.count - imported by itertools, heapq, /data/centos/eqagent_0.1.4/bin/test.py
missing module named itertools.tee - imported by itertools, heapq, /data/centos/eqagent_0.1.4/bin/test.py
missing module named itertools.islice - imported by itertools, heapq, reprlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named itertools.starmap - imported by itertools, collections, /data/centos/eqagent_0.1.4/bin/test.py
missing module named itertools.chain - imported by itertools, heapq, tokenize, collections, decimal, /data/centos/eqagent_0.1.4/bin/test.py
missing module named itertools.repeat - imported by itertools, tokenize, collections, decimal, /data/centos/eqagent_0.1.4/bin/test.py
missing module named gettext.gettext - imported by gettext, argparse, optparse, getopt, /data/centos/eqagent_0.1.4/bin/test.py
missing module named binascii.a2b_qp - imported by binascii, quopri, /data/centos/eqagent_0.1.4/bin/test.py
missing module named binascii.b2a_qp - imported by binascii, quopri, /data/centos/eqagent_0.1.4/bin/test.py
missing module named binascii.a2b_base64 - imported by binascii, email.base64mime, /data/centos/eqagent_0.1.4/bin/test.py
missing module named binascii.b2a_base64 - imported by binascii, email.base64mime, /data/centos/eqagent_0.1.4/bin/test.py
missing module named binascii.unhexlify - imported by binascii, requests.packages.urllib3.util.ssl_
missing module named binascii.hexlify - imported by binascii, requests.packages.urllib3.util.ssl_
missing module named _functools.partial - imported by _functools, functools, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _functools.reduce - imported by _functools, functools, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _thread.allocate_lock - imported by _thread, _strptime, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _thread.stack_size - imported by _thread, threading, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _thread._local - imported by _thread, threading, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _thread.get_ident - imported by _thread, reprlib, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _thread.RLock - imported by _thread, functools, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _functools.cmp_to_key - imported by _functools, functools, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _weakref.ProxyType - imported by _weakref, weakref, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _weakref.ReferenceType - imported by _weakref, weakref, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _weakref.getweakrefs - imported by _weakref, weakref, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _weakref.proxy - imported by _weakref, weakref, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _weakref.getweakrefcount - imported by _weakref, weakref, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _weakref.ref - imported by _weakref, weakref, _weakrefset, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _weakref.CallableProxyType - imported by _weakref, weakref, /data/centos/eqagent_0.1.4/bin/test.py
missing module named builtins.str - imported by builtins, locale, /data/centos/eqagent_0.1.4/bin/test.py
missing module named builtins.open - imported by builtins, tarfile, /data/centos/eqagent_0.1.4/bin/test.py
missing module named org - imported by copy, /data/centos/eqagent_0.1.4/bin/test.py
missing module named org.PyStringMap - imported by org, copy, /data/centos/eqagent_0.1.4/bin/test.py
missing module named copy.deepcopy - imported by copy, weakref, /data/centos/eqagent_0.1.4/bin/test.py
missing module named sys.modules - imported by sys, dummy_threading, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.BufferedReader - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.BytesIO - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.DEFAULT_BUFFER_SIZE - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.StringIO - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.BufferedRWPair - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.BufferedWriter - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.UnsupportedOperation - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.IncrementalNewlineDecoder - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.BlockingIOError - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.BufferedRandom - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.FileIO - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.open - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _io.TextIOWrapper - imported by _io, io, /data/centos/eqagent_0.1.4/bin/test.py
missing module named _sre.MAXREPEAT - imported by _sre, sre_compile, sre_constants, sre_parse, /data/centos/eqagent_0.1.4/bin/test.py
missing module named chardet - imported by requests.packages
missing module named sys.version_info - imported by sys, requests.packages.chardet
missing module named urllib3 - imported by requests.packages
missing module named 'requests.packages.urllib3.packages.six.moves'.http_client - imported by 'requests.packages.urllib3.packages.six.moves', requests.packages.urllib3.util.response, requests.packages.urllib3.response
missing module named 'requests.packages.urllib3.packages.six.moves' - imported by requests.packages.urllib3.util.response, requests.packages.urllib3.response
missing module named StringIO - imported by requests.packages.urllib3.packages.six, requests.compat
missing module named StringIO.StringIO - imported by StringIO, requests.compat
missing module named backports.match_hostname - imported by backports, requests.packages.urllib3.packages.ssl_match_hostname
missing module named backports.CertificateError - imported by backports, requests.packages.urllib3.packages.ssl_match_hostname
missing module named backports - imported by requests.packages.urllib3.packages.ssl_match_hostname
missing module named httplib.HTTPException - imported by httplib, requests.packages.urllib3.connection
missing module named httplib.HTTPConnection - imported by httplib, requests.packages.urllib3.connection
missing module named httplib - imported by requests.packages.urllib3.connection
missing module named _abcoll.ValuesView - imported by _abcoll, requests.packages.urllib3.packages.ordered_dict
missing module named _abcoll.KeysView - imported by _abcoll, requests.packages.urllib3.packages.ordered_dict
missing module named _abcoll.ItemsView - imported by _abcoll, requests.packages.urllib3.packages.ordered_dict
missing module named _abcoll - imported by requests.packages.urllib3.packages.ordered_dict
missing module named dummy_thread.get_ident - imported by dummy_thread, requests.packages.urllib3.packages.ordered_dict
missing module named dummy_thread - imported by requests.packages.urllib3.packages.ordered_dict
missing module named thread.get_ident - imported by thread, requests.packages.urllib3.packages.ordered_dict
missing module named thread - imported by requests.packages.urllib3.packages.ordered_dict
missing module named urlparse.urljoin - imported by urlparse, requests.packages.urllib3.poolmanager, requests.compat
missing module named urlparse - imported by requests.packages.urllib3.poolmanager, requests.compat
missing module named urlparse.urlsplit - imported by urlparse, requests.compat
missing module named urlparse.urlunparse - imported by urlparse, requests.compat
missing module named urlparse.urlparse - imported by urlparse, requests.compat
missing module named urlparse.urldefrag - imported by urlparse, requests.compat
missing module named netbios - imported by uuid
missing module named win32wnet - imported by uuid
missing module named _ctypes._wstring_at_addr - imported by _ctypes, ctypes
missing module named _ctypes._string_at_addr - imported by _ctypes, ctypes
missing module named _ctypes._cast_addr - imported by _ctypes, ctypes
missing module named _ctypes._memset_addr - imported by _ctypes, ctypes
missing module named _ctypes._memmove_addr - imported by _ctypes, ctypes
missing module named _ctypes.get_last_error - imported by _ctypes, ctypes
missing module named _ctypes.set_last_error - imported by _ctypes, ctypes
missing module named _ctypes._check_HRESULT - imported by _ctypes, ctypes
missing module named _ctypes._pointer_type_cache - imported by _ctypes, ctypes
missing module named _ctypes.pointer - imported by _ctypes, ctypes
missing module named _ctypes.POINTER - imported by _ctypes, ctypes
missing module named _ctypes._SimpleCData - imported by _ctypes, ctypes
missing module named _ctypes.set_errno - imported by _ctypes, ctypes
missing module named _ctypes.get_errno - imported by _ctypes, ctypes
missing module named _ctypes.byref - imported by _ctypes, ctypes
missing module named _ctypes.addressof - imported by _ctypes, ctypes
missing module named _ctypes.alignment - imported by _ctypes, ctypes
missing module named _ctypes.resize - imported by _ctypes, ctypes
missing module named _ctypes.sizeof - imported by _ctypes, ctypes
missing module named _ctypes.dlopen - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_STDCALL - imported by _ctypes, ctypes
missing module named _ctypes.LoadLibrary - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_USE_ERRNO - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_USE_LASTERROR - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_CDECL - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_PYTHONAPI - imported by _ctypes, ctypes
missing module named _ctypes.FormatError - imported by _ctypes, ctypes
missing module named _ctypes.ArgumentError - imported by _ctypes, ctypes
missing module named _ctypes.RTLD_GLOBAL - imported by _ctypes, ctypes
missing module named _ctypes.RTLD_LOCAL - imported by _ctypes, ctypes
missing module named _ctypes.__version__ - imported by _ctypes, ctypes
missing module named _ctypes.CFuncPtr - imported by _ctypes, ctypes
missing module named _ctypes._Pointer - imported by _ctypes, ctypes
missing module named _ctypes.Structure - imported by _ctypes, ctypes
missing module named _ctypes.Array - imported by _ctypes, ctypes
missing module named _ctypes.Union - imported by _ctypes, ctypes
missing module named Queue.Empty - imported by Queue, requests.packages.urllib3.connectionpool
missing module named Queue.LifoQueue - imported by Queue, requests.packages.urllib3.connectionpool
missing module named Queue.Full - imported by Queue, requests.packages.urllib3.connectionpool
missing module named Queue - imported by requests.packages.urllib3.connectionpool
missing module named Cookie.Morsel - imported by Cookie, requests.compat
missing module named Cookie - imported by requests.compat
missing module named cookielib - imported by requests.compat
missing module named urllib2.parse_http_list - imported by urllib2, requests.compat
missing module named urllib2 - imported by requests.compat
missing module named _json.make_encoder - imported by _json, json.encoder
missing module named _json.encode_basestring_ascii - imported by _json, json.encoder
missing module named _json.scanstring - imported by _json, json.decoder
missing module named _json.make_scanner - imported by _json, json.scanner
missing module named simplejson._speedups.make_encoder - imported by simplejson._speedups, simplejson
missing module named simplejson._speedups.scanstring - imported by simplejson._speedups, simplejson.decoder
missing module named simplejson._speedups.make_scanner - imported by simplejson._speedups, simplejson.scanner
missing module named UserDict.DictMixin - imported by UserDict, simplejson.ordered_dict
missing module named UserDict - imported by simplejson.ordered_dict
missing module named cStringIO - imported by simplejson.compat
missing module named copy_reg - imported by cStringIO
missing module named certifi.where - imported by certifi, requests.certs
missing module named certifi - imported by requests.certs
missing module named 'pyasn1.type'.constraint - imported by 'pyasn1.type', requests.packages.urllib3.contrib.pyopenssl
missing module named 'pyasn1.type'.univ - imported by 'pyasn1.type', requests.packages.urllib3.contrib.pyopenssl
missing module named 'pyasn1.type' - imported by requests.packages.urllib3.contrib.pyopenssl
missing module named pyasn1.decoder - imported by pyasn1, requests.packages.urllib3.contrib.pyopenssl
missing module named pyasn1 - imported by requests.packages.urllib3.contrib.pyopenssl
missing module named OpenSSL - imported by requests.packages.urllib3.contrib.pyopenssl
missing module named 'ndg.httpsclient'.SubjectAltName - imported by 'ndg.httpsclient', requests.packages.urllib3.contrib.pyopenssl
missing module named 'ndg.httpsclient' - imported by requests.packages.urllib3.contrib.pyopenssl
missing module named ndg.SUBJ_ALT_NAME_SUPPORT - imported by ndg, requests.packages.urllib3.contrib.pyopenssl
missing module named ndg - imported by requests.packages.urllib3.contrib.pyopenssl






Hartmut Goebel

unread,
Nov 13, 2015, 4:32:25 AM11/13/15
to pyins...@googlegroups.com
Am 11.11.2015 um 09:48 schrieb ofir....@equalum.io:
AttributeError: 'module' object has no attribute 'get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 5, in <module>
AttributeError: 'module' object has no attribute 'exceptions'

This looks like some wrong "requests" package is imported for some reason. Please check in build/test/out00-Analysis.toc where this module is taken from.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/bewertung-pgp-verschlusselung-bei-web.de-und-gmx
Kolumne: http://www.cissp-gefluester.de/2010-01-hinterturen-allen-ortes

ofir....@equalum.io

unread,
Nov 15, 2015, 4:56:56 AM11/15/15
to PyInstaller
Thanks for the response!

That out00-Analysis.toc file is not short, I grepped for it, got one line back:
$ cat out00-Analysis.toc | grep requests
 [('base_library.zip', '/data/centos/eqagent_0.1.4/bin/build/test/base_library.zip', 'DATA'), ('requests/cacert.pem', '/opt/rh/python33/root/usr/lib/python3.3/site-packages/requests/cacert.pem', 'DATA'), ('include/python3.3m/pyconfig-64.h', '/opt/rh/python33/root/usr/include/python3.3m/pyconfig-64.h', 'DATA'), ('lib64/python3.3/config-3.3m/Makefile', '/opt/rh/python33/root/usr/lib64/python3.3/config-3.3m/Makefile', 'DATA')],

The files mentioned in this line do exist:
$ ll /opt/rh/python33/root/usr/lib/python3.3/site-packages/requests/cacert.pem
-rw-r--r--. 1 root root 344712 Nov 11 08:05 /opt/rh/python33/root/usr/lib/python3.3/site-packages/requests/cacert.pem
$ ll /opt/rh/python33/root/usr/include/python3.3m/pyconfig-64.h
-rw-r--r--. 1 root root 42341 Aug 14  2014 /opt/rh/python33/root/usr/include/python3.3m/pyconfig-64.h
$ ll /opt/rh/python33/root/usr/lib64/python3.3/config-3.3m/Makefile
-rw-r--r--. 1 root root 57749 Aug 14  2014 /opt/rh/python33/root/usr/lib64/python3.3/config-3.3m/Makefile

How should I proceed?
Many thanks,
   Ofir

Hartmut Goebel

unread,
Nov 15, 2015, 5:46:36 AM11/15/15
to pyins...@googlegroups.com
Hi,

puh, this seams to be complicated.

The data-files related to requests (cacert.pem) are included. Which means that the requests module's hook is executed, which means that the requests module has been found by PyInstaller. But the module is missing in out00-Analysis.toc.

Are you sure, these are *all* places where "requests" occurs in 
out00-Analysis.toc? There should be entries like:

('requests', '/usr/lib/python3.4/site-packages/requests/__init__.py', 'PYMODULE')

$ cat out00-Analysis.toc | grep requests

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

ofir....@equalum.io

unread,
Nov 15, 2015, 7:45:35 AM11/15/15
to PyInstaller
Yes, that was the full output of the grep :(
I also grepped for site-packages and looked one by one - no other instance of requests (only several of simplejson).
Is there a change you could run my test case from the first post and see if it reproduces? I'm pretty stuck...
Thanks,
  Ofir

Hartmut Goebel

unread,
Nov 15, 2015, 8:59:29 AM11/15/15
to pyins...@googlegroups.com
Am 15.11.2015 um 13:45 schrieb ofir....@equalum.io:
Is there a change you could run my test case from the first post and see if it reproduces? I'm pretty stuck...

I did in a fresh virtual-env and it worked.


--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

ofir....@equalum.io

unread,
Nov 16, 2015, 4:49:05 AM11/16/15
to PyInstaller

I did in a fresh virtual-env and it worked.

That is quite unfortunate :(
Can you share your environment details with me? Maybe it will work for me as well (O/S, Python).
I do have a pretty clean install (though I haven't used virtual-env).
Thanks,
    Ofir

ofir....@equalum.io

unread,
Nov 18, 2015, 11:25:21 AM11/18/15
to PyInstaller
Quick update.
I created a new CentOS 6 machine (previous test was CentOS 7).
Same error.
Here is how I installed / configured Python after using a standard CentOS image on AWS:

yum -y install scl-utils
rpm -Uvh https://www.softwarecollections.org/en/scls/rhscl/python33/epel-6-x86_64/download/rhscl-python33-epel-6-x86_64.noarch.rpm
yum -y install python33
scl enable python33 bash
easy_install pip
pip install requests
pip install pyinstaller


Maybe something is non-standard in the Python version in SCL? Not sure how to proceed
  Ofir

Hartmut Goebel

unread,
Nov 19, 2015, 3:19:18 AM11/19/15
to pyins...@googlegroups.com
Am 18.11.2015 um 17:25 schrieb ofir....@equalum.io:
Maybe something is non-standard in the Python version in SCL? Not sure how to proceed

Sorry, I don't have any clue either.

Have you tried without this `scl`-thing?

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Reply all
Reply to author
Forward
0 new messages