On 14/06/14 09:40, Glenn Ramsey wrote:
On 13/06/14 20:05, Martin Zibricky wrote:
On Friday 13 of June 2014 12:23:36 Glenn Ramsey wrote:
It works properly on OSX and when run from the command line or from
Eclipse/PyDev in Windows.
Does anyone know what the problem might be? How can I debug this in the
packaged app?
You haven't mentioned pyinstaller version.
Oops, sorry. I'm using the latest develop branch.
Also just to be clear about what is hanging. The main thread keeps running, it's
the thread that is calling suds that hangs.
Glenn
Here is a minimal example to demonstrate the problem.
What tools can I use to debug this?
sudshang.py:
import sys
import suds
import suds.client
#import PyQt5.Qt # uncomment this to cause hang
import threading
from functools import partial
WebServiceTimeout = 30
url = "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"
def get_with_cb(callback):
print "getting %s" % url
# hang happens on the following line
client = suds.client.Client(url, timeout=WebServiceTimeout)
print "client is: ", client
callback("get_with_cb")
def callback(arg):
print "done", arg
sys.stdout.flush()
class Async(object):
def __init__(self, callback):
self._callback = callback
def start(self):
p = partial(get_with_cb, self._callback)
t = threading.Thread(target=p)
t.start()
sys.stdout.flush()
print "thread started"
self.t = t
def join(self):
self.t.join()
def main():
# call it in the main thread to prove that it works
get_with_cb(callback)
# call it in another thread
w = Async(callback)
w.start()
print "waiting"
w.join()
print "finished waiting"
if __name__ == "__main__":
main()
-----
Freeze using:
pyinstaller.py -y sudshang[.py|.spec]
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.