jeudi 2 avril 2015

python executable gives error 10013 :an attempt was made to access a socket in a way forbidden by its access permissions

My python script works fine in win 7 pycharm ide and i can also make it run in cmd window by "python .py" with no errors. However when i make it executable with cx_freeze , i see "error 10013 an attempt was made to access a socket in a way forbidden by its access permissions" error. I`ve searched through all the web for possible solutions but nothing worked. Here is my setup.py script for cx_freeze:



from cx_Freeze import setup, Executable
build_exe_options = {"packages": ["os"]}
setup(
name = "XLATE ",
version = "3.0",
description = "mydesc",
options = {"build_exe": build_exe_options},
executables = [Executable("cdecode_v3_thr.py", base = None)])


Script is a small gui(tkinter) app which basically uses urllib2 to reach to google translate web service. I also needed to specify proxy authentication by ProxyHandler(). Since its company network , i know there are strict rules that might apply to network permissions but i can not see any reason why it works in IDE or cmd window but does not work after cx_freeze.


I have even tried to change the default port numbers ( to a high number like 9999) in httplib.py with no success.


Hope you can help out!


Aucun commentaire:

Enregistrer un commentaire