From: ansonc <an...@al...> - 2015-05-17 01:57:19
|
hi,I see the previous post is messed up with html format. Let me make clearer here. I'm working on a router firmware updating tool using tftp protocol. It's a machine to machine connecting directly via a ethernet cable. The PC is configured with static IP and so is the client router. The problem is when I start the tool directly as python script, it works well and the comunication is all ok. But when I start it after py2exe, the communication is not working. BTW, the environment is WIN7, python2.7.9, py2exe-0.6.9. I put the code base on https://git.oschina.net/manup/XerImageUpdater.git. Please take some time and give some feedback. Many thanks. ------------------------------------------------------------------发件人:py2exe-users-request <py2...@li...>发送时间:2015年5月16日(星期六) 14:07收件人:py2exe-users <py2...@li...>主 题:Py2exe-users Digest, Vol 107, Issue 1Send Py2exe-users mailing list submissions to py2...@li...To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/py2exe-usersor, via email, send a message with subject or body 'help' to py2...@li...You can reach the person managing the list at py2...@li...When replying, please edit your Subject line so it is more specificthan "Re: Contents of Py2exe-users digest..."Today's Topics: 1. user compains dist\library\win32com.shell.shell.pyd is caught by webroot anitvirus (Michael Katz) 2. importing from six.moves using from syntax results in maximum recursion depth error (Richard Waite) 3. py2exe 0.9.2.2 "from six.moves.urllib.parse import <something>" causes loop that eventually crashes the interpreter (Richard Waite) 4. py2exe 0.9.2.2 ?maximum recursion depth exceeded? (V?ctor Guzm?n Pedrajas) 5. socket failed to connected after py2exe packed (ansonc)----------------------------------------------------------------------Message: 1Date: Thu, 2 Apr 2015 21:36:44 +0000 (UTC)From: Michael Katz <mic...@ya...>Subject: [Py2exe-users] user compains dist\library\win32com.shell.shell.pyd is caught by webroot anitvirusTo: "py2...@li..." <py2...@li...>Message-ID: <185...@ma...>Content-Type: text/plain; charset="utf-8"My distribution as built by py2exe includes the file?win32com.shell.shell.pyd, which appears to be a py2exe-ification of?C:\Python27\Lib\site-packages\win32comext\shell\shell.pyd (same file contents).Webroot security software is telling a this user that the file is carrying a trojan, and deletes the file, breaking the app.I haven't heard of this problem from any other user, and we have thousands of installs.I imagine that shell.pyd has references to lots of system calls that look potentially dangerous and maybe that's why it's getting flagged?Has anyone else run into this?-------------- next part --------------An HTML attachment was scrubbed...------------------------------Message: 2Date: Sat, 11 Apr 2015 00:33:28 -0400From: Richard Waite <ric...@gm...>Subject: [Py2exe-users] importing from six.moves using from syntax results in maximum recursion depth errorTo: py2...@li...Message-ID: <7E4...@gm...>Content-Type: text/plain; charset=utf-8I ended up finding that some third party modules were doing things like ?from six.moves import range? and this would result in a recursion depth error. Changing to ?import six.moves? and changing the references to accommodate would fix it, but there are so many uses like that it became a nightmare. I kept changing them in one module, retrying, and then finding more that reference it.------------------------------Message: 3Date: Mon, 13 Apr 2015 15:40:53 -0400From: Richard Waite <ric...@gm...>Subject: [Py2exe-users] py2exe 0.9.2.2 "from six.moves.urllib.parse import <something>" causes loop that eventually crashes the interpreterTo: py2...@li...Message-ID: <538...@gm...>Content-Type: text/plain; charset=utf-8I posted something about this problem to the list a few days ago, but I think I have a better idea of what exactly is causing the problem. The basic behavior was when running ?build_exe? on my project I would get a traceback with a ?maximum recursion depth exceeded?.I tracked this down to something related to the six package and ?from? style imports. Originally I believed that all ?from? style imports were causing the error, but through debugging the build process I have found that only when ?from six.moves.subpackage? and ?from six.moves.subpackage.subsubpackage? are causing the error.In particular, in ?google_api_python_client? 1.4.0, in googleapiclient/discovery.py there is a line from six.moves.urllib.parse import urlencode, urlparse, urljoin, urlunparse, parse_sqlIf I step through the build process in a debugger, it looks like it starts to find modules and eventually causes a loop where _find_and_load is originally called with six.moves.urllib.parse and then settles into a loop with six.moves.urllib as the name. The loop seems to ?reoccur" in __getattr__ in hooks.py:288 (which itself is called from mf3.py:300). It calls self.__finder.safe_import_hook which restarts the safe_import_hook->import_hook->_gcd_import->_find_and_load->__getattr__ loop.Some information about my setup: Python 3.4.3 on Windows 8.1, py2exe 0.9.2.2.Finally, it is only my theory that from six.moves.<subpackages> is the root cause. It may still be something specific to six.moves.urllib.parse - that is just the only example I have of the problem occurring.Any help would be appreciated. Thanks.------------------------------Message: 4Date: Fri, 15 May 2015 19:25:50 +0200From: V?ctor Guzm?n Pedrajas <vgz...@gm...>Subject: [Py2exe-users] py2exe 0.9.2.2 ?maximum recursion depth exceeded?To: py2...@li...Message-ID: <CAEtXc2CQmy+DB2aQbqgMkSR_Pup5HMTY_oEwP4cEGwFk=sx...@ma...>Content-Type: text/plain; charset="utf-8"Hello,I have been using py2exe without troubles, but today I received the sameerror that Richard Waite is saying.I am in Windows 8.1 64 bits. It works fine with Python 64 bits, but as Itried using Python 32 bits this started happening.I don't have the package "six" installed (pip list doesn't show six), so Isuppose it's not caused by it alone.I have seen two other users asking in StackOverflow in the last month(without answers):http://stackoverflow.com/questions/29649440/py2exe-runtimeerror-with-tweepyhttp://stackoverflow.com/questions/29982147/python-3-4-py2exe-google-api-clientMy stack trace is: [. . .] return self._find_and_load(name) File "C:\Python34_32b\lib\site-packages\py2exe\mf3.py", line 298, in_find_and_load getattr(parent_module, name.rpartition('.')[2]) File "C:\Python34_32b\lib\site-packages\py2exe\hooks.py", line 291, in__getattr__ self.__finder.safe_import_hook(renamed, caller=self) File "C:\Python34_32b\lib\site-packages\py2exe\mf3.py", line 138, insafe_import_hook self.import_hook(name, caller, fromlist, level) File "C:\Python34_32b\lib\site-packages\py2exe\mf3.py", line 120, inimport_hook module = self._gcd_import(name) File "C:\Python34_32b\lib\site-packages\py2exe\mf3.py", line 274, in_gcd_import return self._find_and_load(name) File "C:\Python34_32b\lib\site-packages\py2exe\mf3.py", line 298, in_find_and_load getattr(parent_module, name.rpartition('.')[2])RuntimeError: maximum recursion depth exceeded while calling a Python objectAny help appreciated.Regards-------------- next part --------------An HTML attachment was scrubbed...------------------------------Message: 5Date: Sat, 16 May 2015 14:06:37 +0800From: "ansonc" <an...@al...>Subject: [Py2exe-users] socket failed to connected after py2exe packedTo: "py2exe-users" <py2...@li...>Message-ID: <672...@al...>Content-Type: text/plain; charset="utf-8"hi,?I'm using python2.7 py2exe-0.6.7 to pack my tftp application which I found the socket not working. And I wrote a testing script of socket to confirm the issue and the result is the socket could not work after pack to exe. The socket script and setup.py is as followed, please see what I missed. Many thanks.#sockexe.pyimport?socketif?__name__?==?'__main__':????import?socket????sock?=?socket.socket(socket.AF_INET,?socket.SOCK_STREAM)????sock.bind(('0.0.0.0',?8001))????sock.listen(5)????while?True:????????connection,address?=?sock.accept()????????try:????????????connection.settimeout(5)????????????buf?=?connection.recv(1024)????????????if?buf:????????????????print?buf????????????????connection.send(buf)????????except?socket.timeout:????????????print?'time?out'????????connection.close()#setup.pyfrom?distutils.core?import?setupimport?py2exesetup(??????console=[{"script":?"exepack.py",?"icon_resources":?[(1,?"v.ico")]?}],???????name='whatever',??????)-------------- next part --------------An HTML attachment was scrubbed...------------------------------------------------------------------------------------------------------------One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applicationsPerformance metrics, stats and reports that give you Actionable InsightsDeep dive visibility with transaction tracing using APM Insight.http://ad.doubleclick.net/ddm/clk/290420510;117567292;y------------------------------_______________________________________________Py2exe-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/py2exe-usersEnd of Py2exe-users Digest, Vol 107, Issue 1******************************************** |