one problem in cx_Freeze4.3.3 for Python3.4

8pa2y han hanziyuan08 at gmail.com
Sun Sep 21 05:39:24 CEST 2014


#torrent.py
---------------------
import re
import urllib.request
import urllib.parse

urltemp = 'https://btdigg.org/search?info_hash=&q='
urlinput = urllib.parse.quote(input('Please input keywords:'))
url = urltemp + urlinput
print('--------------------Searching--------------------'+'\n'+url)
content = urllib.parse.unquote(urllib.request.urlopen(url).read().decode('utf-8'))
recon = re.findall(r'href="(magnet:.+?)"',content)
print('--------------------Order address--------------------'+'\n'+str(recon))
a=[]
for temp in recon:
	b = re.sub(';','&',temp)
	a.append(b)
print('--------------------Right address--------------------'+'\n'+str(a))
print('--------------------Address has been updated--------------------')
file = open('torrent.txt','w')
for temp2 in a:
	file.write(temp2+'\n')
file.close()

--------------------------------------
I use cx_Freeze to project it into '.exe',but when I turn on 'torrent.exe' it tips that:
AttributeError: 'module  object has no attribute '_fix_up_module'

--------------------------------------
cx_Freeze log:
---------------
creating directory dist
copying D:\Program Files\Python\lib\site-packages\cx_freeze-4.3.3-py3.4-win32.egg\cx_Freeze\bases\Console.exe -> dist\torrent.exe
copying C:\Windows\SYSTEM32\python34.dll -> dist\python34.dll
writing zip file dist\torrent.exe

  Name                      File
  ----                      ----
m __main__                  torrent.py
m _bisect                   
m _bootlocale               
m _bz2                      D:\Program Files\Python\DLLs\_bz2.pyd
m _codecs                   
m _codecs_cn                
m _codecs_hk                
m _codecs_iso2022           
m _codecs_jp                
m _codecs_kr                
m _codecs_tw                
m _collections              
m _collections_abc          
m _datetime                 
m _dummy_thread             
m _functools                
m _hashlib                  D:\Program Files\Python\DLLs\_hashlib.pyd
m _heapq                    
m _imp                      
m _io                       
m _locale                   
m _lzma                     D:\Program Files\Python\DLLs\_lzma.pyd
m _md5                      
m _multibytecodec           
m _operator                 
m _osx_support              D:\Program Files\Python\lib\_osx_support.py
m _random                   
m _sha1                     
m _sha256                   
m _sha512                   
m _socket                   D:\Program Files\Python\DLLs\_socket.pyd
m _sre                      
m _ssl                      D:\Program Files\Python\DLLs\_ssl.pyd
m _stat                     
m _string                   
m _strptime                 
m _struct                   
m _thread                   
m _threading_local          
m _warnings                 
m _weakref                  
m _weakrefset               
m abc                       
m argparse                  
m array                     
m atexit                    
m base64                    
m binascii                  
m bisect                    D:\Program Files\Python\lib\bisect.py
m builtins                  
m bz2                       
m calendar                  
m codecs                    
P collections               
m collections.abc           
m contextlib                
m copy                      
m copyreg                   
m cx_Freeze__init__         D:\Program Files\Python\lib\site-packages\cx_freeze-4.3.3-py3.4-win32.egg\cx_Freeze\initscripts\Console.py
m datetime                  
P distutils                 D:\Program Files\Python\lib\distutils\__init__.py
m distutils.debug           D:\Program Files\Python\lib\distutils\debug.py
m distutils.errors          D:\Program Files\Python\lib\distutils\errors.py
m distutils.log             D:\Program Files\Python\lib\distutils\log.py
m distutils.spawn           D:\Program Files\Python\lib\distutils\spawn.py
m distutils.sysconfig       D:\Program Files\Python\lib\distutils\sysconfig.py
m distutils.text_file       D:\Program Files\Python\lib\distutils\text_file.py
m dummy_threading           
P email                     D:\Program Files\Python\lib\email\__init__.py
m email._encoded_words      D:\Program Files\Python\lib\email\_encoded_words.py
m email._header_value_parser D:\Program Files\Python\lib\email\_header_value_parser.py
m email._parseaddr          D:\Program Files\Python\lib\email\_parseaddr.py
m email._policybase         D:\Program Files\Python\lib\email\_policybase.py
m email.base64mime          D:\Program Files\Python\lib\email\base64mime.py
m email.charset             D:\Program Files\Python\lib\email\charset.py
m email.contentmanager      D:\Program Files\Python\lib\email\contentmanager.py
m email.encoders            D:\Program Files\Python\lib\email\encoders.py
m email.errors              D:\Program Files\Python\lib\email\errors.py
m email.feedparser          D:\Program Files\Python\lib\email\feedparser.py
m email.generator           D:\Program Files\Python\lib\email\generator.py
m email.header              D:\Program Files\Python\lib\email\header.py
m email.headerregistry      D:\Program Files\Python\lib\email\headerregistry.py
m email.iterators           D:\Program Files\Python\lib\email\iterators.py
m email.message             D:\Program Files\Python\lib\email\message.py
m email.parser              D:\Program Files\Python\lib\email\parser.py
m email.policy              D:\Program Files\Python\lib\email\policy.py
m email.quoprimime          D:\Program Files\Python\lib\email\quoprimime.py
m email.utils               D:\Program Files\Python\lib\email\utils.py
P encodings                 
m encodings.aliases         
m encodings.ascii           
m encodings.base64_codec    
m encodings.big5            
m encodings.big5hkscs       
m encodings.bz2_codec       
m encodings.charmap         
m encodings.cp037           
m encodings.cp1006          
m encodings.cp1026          
m encodings.cp1125          
m encodings.cp1140          
m encodings.cp1250          
m encodings.cp1251          
m encodings.cp1252          
m encodings.cp1253          
m encodings.cp1254          
m encodings.cp1255          
m encodings.cp1256          
m encodings.cp1257          
m encodings.cp1258          
m encodings.cp273           
m encodings.cp424           
m encodings.cp437           
m encodings.cp500           
m encodings.cp65001         
m encodings.cp720           
m encodings.cp737           
m encodings.cp775           
m encodings.cp850           
m encodings.cp852           
m encodings.cp855           
m encodings.cp856           
m encodings.cp857           
m encodings.cp858           
m encodings.cp860           
m encodings.cp861           
m encodings.cp862           
m encodings.cp863           
m encodings.cp864           
m encodings.cp865           
m encodings.cp866           
m encodings.cp869           
m encodings.cp874           
m encodings.cp875           
m encodings.cp932           
m encodings.cp949           
m encodings.cp950           
m encodings.euc_jis_2004    
m encodings.euc_jisx0213    
m encodings.euc_jp          
m encodings.euc_kr          
m encodings.gb18030         
m encodings.gb2312          
m encodings.gbk             
m encodings.hex_codec       
m encodings.hp_roman8       
m encodings.hz              
m encodings.idna            
m encodings.iso2022_jp      
m encodings.iso2022_jp_1    
m encodings.iso2022_jp_2    
m encodings.iso2022_jp_2004 
m encodings.iso2022_jp_3    
m encodings.iso2022_jp_ext  
m encodings.iso2022_kr      
m encodings.iso8859_1       
m encodings.iso8859_10      
m encodings.iso8859_11      
m encodings.iso8859_13      
m encodings.iso8859_14      
m encodings.iso8859_15      
m encodings.iso8859_16      
m encodings.iso8859_2       
m encodings.iso8859_3       
m encodings.iso8859_4       
m encodings.iso8859_5       
m encodings.iso8859_6       
m encodings.iso8859_7       
m encodings.iso8859_8       
m encodings.iso8859_9       
m encodings.johab           
m encodings.koi8_r          
m encodings.koi8_u          
m encodings.latin_1         
m encodings.mac_arabic      
m encodings.mac_centeuro    
m encodings.mac_croatian    
m encodings.mac_cyrillic    
m encodings.mac_farsi       
m encodings.mac_greek       
m encodings.mac_iceland     
m encodings.mac_latin2      
m encodings.mac_roman       
m encodings.mac_romanian    
m encodings.mac_turkish     
m encodings.mbcs            
m encodings.palmos          
m encodings.ptcp154         
m encodings.punycode        
m encodings.quopri_codec    
m encodings.raw_unicode_escape 
m encodings.rot_13          
m encodings.shift_jis       
m encodings.shift_jis_2004  
m encodings.shift_jisx0213  
m encodings.tis_620         
m encodings.undefined       
m encodings.unicode_escape  
m encodings.unicode_internal 
m encodings.utf_16          
m encodings.utf_16_be       
m encodings.utf_16_le       
m encodings.utf_32          
m encodings.utf_32_be       
m encodings.utf_32_le       
m encodings.utf_7           
m encodings.utf_8           
m encodings.utf_8_sig       
m encodings.uu_codec        
m encodings.zlib_codec      
m enum                      D:\Program Files\Python\lib\enum.py
m errno                     
m fnmatch                   D:\Program Files\Python\lib\fnmatch.py
m ftplib                    D:\Program Files\Python\lib\ftplib.py
m functools                 
m gc                        
m genericpath               
m getopt                    D:\Program Files\Python\lib\getopt.py
m getpass                   D:\Program Files\Python\lib\getpass.py
m gettext                   
m gzip                      D:\Program Files\Python\lib\gzip.py
m hashlib                   D:\Program Files\Python\lib\hashlib.py
m heapq                     
P http                      D:\Program Files\Python\lib\http\__init__.py
m http.client               D:\Program Files\Python\lib\http\client.py
m http.cookiejar            D:\Program Files\Python\lib\http\cookiejar.py
P importlib                 D:\Program Files\Python\lib\importlib\__init__.py
P importlib                 D:\Program Files\Python\lib\importlib\__init__.py
m importlib._bootstrap      
m importlib._bootstrap      D:\Program Files\Python\lib\importlib\_bootstrap.py
m importlib.machinery       D:\Program Files\Python\lib\importlib\machinery.py
m importlib.util            D:\Program Files\Python\lib\importlib\util.py
m io                        
m itertools                 
m keyword                   
m linecache                 
m locale                    
P logging                   D:\Program Files\Python\lib\logging\__init__.py
m lzma                      D:\Program Files\Python\lib\lzma.py
m math                      
m mimetypes                 D:\Program Files\Python\lib\mimetypes.py
m msvcrt                    
m nt                        
m ntpath                    
m nturl2path                D:\Program Files\Python\lib\nturl2path.py
m operator                  
m optparse                  
m os                        
m posixpath                 
m py_compile                D:\Program Files\Python\lib\py_compile.py
m quopri                    
m random                    D:\Program Files\Python\lib\random.py
m re                        
m reprlib                   
m shutil                    D:\Program Files\Python\lib\shutil.py
m socket                    D:\Program Files\Python\lib\socket.py
m sre_compile               
m sre_constants             
m sre_parse                 
m ssl                       D:\Program Files\Python\lib\ssl.py
m stat                      
m string                    
m stringprep                
m struct                    
m sys                       
m tarfile                   D:\Program Files\Python\lib\tarfile.py
m tempfile                  D:\Program Files\Python\lib\tempfile.py
m textwrap                  
m threading                 
m time                      
m token                     
m tokenize                  
m traceback                 
m types                     
m unicodedata               D:\Program Files\Python\DLLs\unicodedata.pyd
P urllib                    D:\Program Files\Python\lib\urllib\__init__.py
m urllib.error              D:\Program Files\Python\lib\urllib\error.py
m urllib.parse              D:\Program Files\Python\lib\urllib\parse.py
m urllib.request            D:\Program Files\Python\lib\urllib\request.py
m urllib.response           D:\Program Files\Python\lib\urllib\response.py
m uu                        D:\Program Files\Python\lib\uu.py
m warnings                  
m weakref                   
m winreg                    
m zipfile                   D:\Program Files\Python\lib\zipfile.py
m zipimport                 
m zlib                      

Missing modules:
? _dummy_threading imported from dummy_threading
? _scproxy imported from urllib.request
? ce imported from os
? doctest imported from heapq
? grp imported from shutil, tarfile
? org.python.core imported from copy
? os.path imported from os, py_compile, shutil
? posix imported from os
? pwd imported from getpass, posixpath, shutil, tarfile
? subprocess imported from os
? termios imported from getpass
This is not necessarily a problem - the modules may not be needed on this platform.

copying D:\Program Files\Python\DLLs\_bz2.pyd -> dist\_bz2.pyd
copying D:\Program Files\Python\DLLs\_hashlib.pyd -> dist\_hashlib.pyd
copying D:\Program Files\Python\DLLs\_lzma.pyd -> dist\_lzma.pyd
copying D:\Program Files\Python\DLLs\_socket.pyd -> dist\_socket.pyd
copying D:\Program Files\Python\DLLs\_ssl.pyd -> dist\_ssl.pyd
copying D:\Program Files\Python\DLLs\unicodedata.pyd -> dist\unicodedata.pyd
---------------------------------------



More information about the Python-list mailing list