0

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!

Krcn U
  • 411
  • 1
  • 9
  • 16
  • [This similar question](http://stackoverflow.com/questions/6805786/python-urllib2-cannot-open-localhost-on-alternate-port-not-80-error-10013?lq=1) found an issue with the firewall configuration. If python.exe is whitelisted for your firewall, that might be the difference. – Thomas K Apr 02 '15 at 17:41
  • no windows firewall, defender , or any other antivirus are active and still same result. – Krcn U Apr 02 '15 at 17:55

0 Answers0