On Tue, Mar 31, 2009 at 11:32:58AM +0200, Filip Gruszczyński wrote:
> The problem is not reproducible with one thread. If I open the serial
> port on the main thread and then operate on this on additional
>  threads, everything works fine.

So, sys.path becomes None somewhere before you create the Serial object
in another thread? I'm afraid your options are either 1. add watchpoints
to pdb (http://wiki.python.org/moin/PdbImprovments), or 2. use binary
search principle to insert printfs into the middle of the execution
noodle between the known good and the known bad.

In your case, I assume, the good one would be the last statement before
creating the thread, and the bad one -- the creation of the Serial
object. But you do want to check this assumption with two more printfs.
I'd also printf sys.path as the first statement in run(), just in case.
If this doesn't reveal the problem, further divide the first or the
second part depending on the printf result till you find the offending
statement.

With kind regards,
-- 
Baurzhan Ismagulov
http://www.kz-easy.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to