On 6/17/10 3:06 PM, Laurent Verweijen wrote:
>>
>> In your other thread you include an actual traceback:
>>
>> Traceback (most recent call last):
>>   File "subchronous_test.py", line 5, in <module>
>>     send_all(str(p), n)
>>   File "/home/Somelauw/asynchronous.py", line 145, in send_all
>>     while len(data):
>> TypeError: object of type 'int' has no len()
>>
>> The first argumetn to send_all should be the actual Popen subclass. The
>> second should be a string to send. I think that line really is intended
>> to be:
>>
>> send_all(p, str(n)) # assuming 'n' is say, the number 5.
>>
> 
> You are right, I swapped the parameters, but even if I correct it, it
> still gives the second error.
> 

General rule of thumb: its best to never use the word "still" when it
comes to debugging Python and exceptions, unless you are absolutely
certain the exception is precisely the same.

I don't doubt that you may still get an exception on send_all; but there
is no way you're getting the *same* exception (that specific type error:
attempting to call len() on an integer) if you corrected your arguments.

You're getting the EOFError, because you're never sending anything to
the subprocess. You're not getting anything from the subprocess because
it never receives anything to send back. And apparently there's an error
on send, which is causing that problem, but that error is...?

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to