Hello all,
I'm facing a problem with threads. The strange part of it is that it
was working fine with PyQt4.3.x.
It seems like inside the thread it's not able to "import" modules or
access variables anymore. All I get is tracebacks like:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/oroboros/gui/geonames.py",
line 118, in run
self._parent._results = geonames.search(self._txt)
File "/usr/lib/python2.5/site-packages/oroboros/core/geonames.py",
line 42, in search
f = query(url % urllib.quote(name))
File "/usr/lib/python2.5/site-packages/oroboros/core/geonames.py",
line 26, in query
f = urllib.urlopen(url)
File "/usr/lib/python2.5/urllib.py", line 82, in urlopen
return opener.open(url)
File "/usr/lib/python2.5/urllib.py", line 170, in open
urltype, url = splittype(fullurl)
File "/usr/lib/python2.5/urllib.py", line 1020, in splittype
import re
ImportError: No module named re
Or:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/oroboros/gui/geonames.py",
line 117, in run
self._parent._results = geonames.search(self._txt.encode('utf-8'))
File "/usr/lib/python2.5/encodings/__init__.py", line 113, in search_function
_cache[encoding] = None
TypeError: 'NoneType' object does not support item assignment
I know threading is a difficult matter and I'm no expert at all, but
the code used to run Ok under PyQt4.3, so I'm asking, did anything
change, what should I be aware of?
Thanks in advance,
SM.
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt