Re: Strange email.Parser error?

2005-08-18 Thread Andrey Smirnov
Ah - this makes more sense.

Did the implementation of 'fp' file-like object change in 2.4.1 and it
no longer has a read()?

Andre.

Anthony Botrel wrote:
> Hi,
> 
> in the call fp.read(8192) the function read() gets 2 arguments :  and 
> <8192>
> 
> Member functions implicitely get their object as first argument, this
> is why you get this error. So you have 2 possibilities : either read()
> doesn't take an argument anymore, or read() is not a member of fp.
> 
> Anthony B.
> 
> On 8/18/05, Andrey Smirnov <[EMAIL PROTECTED]> wrote:
> 
>>I am getting the following traceback after upgrading my app to Python
>>2.4.1.  It's telling me that there is an error in Parser.py.  It tells
>>me that 'fp.read(8192)' is given 2 arguments, but it is clearly not
>>true.  Does anybody know what's going on here?
>>
>>Traceback (most recent call last):
>>  File "/opt/etext/lib/python2.4/site-packages/etext/enqueue.py", line
>>252, in work
>>worker(e.linkval, info)
>>  File "/opt/etext/bin/etreceive", line 30, in worker
>>result = decode.searchfile(f)
>>  File "/opt/etext/lib/python2.4/site-packages/etext/decode.py", line
>>43, in searchfile
>>return Email(f)
>>  File "/opt/etext/lib/python2.4/site-packages/etext/decode.py", line
>>510, in __init__
>>self.child.append(Email(mf))
>>  File "/opt/etext/lib/python2.4/site-packages/etext/decode.py", line
>>404, in __init__
>>msg = Parser().parse(f)
>>  File "/opt/etext/lib/python2.4/email/Parser.py", line 65, in parse
>>data = fp.read(8192)
>>TypeError: read() takes exactly 1 argument (2 given)
>>
>>Thanks,
>>Andre.
>>
>>--
>>
>>--
>>http://mail.python.org/mailman/listinfo/python-list
>>

-- 


_/_/_/   _/_/  _/ _/ Andre Smirnov
   _/   _/_/  _/_/   _/  CNS - DSE
  _/_/_/   _/_/  _/  _/ _/   303 272-8352 / x78352
 _/   _/_/  _/   _/_/Mailstop: UBRM05-203
_/_/_/_/_/_/   _/ _/

500 Eldorado boulevard
Broomfield, CO 80021





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


Strange email.Parser error?

2005-08-18 Thread Andrey Smirnov
I am getting the following traceback after upgrading my app to Python
2.4.1.  It's telling me that there is an error in Parser.py.  It tells
me that 'fp.read(8192)' is given 2 arguments, but it is clearly not
true.  Does anybody know what's going on here?

Traceback (most recent call last):
  File "/opt/etext/lib/python2.4/site-packages/etext/enqueue.py", line
252, in work
worker(e.linkval, info)
  File "/opt/etext/bin/etreceive", line 30, in worker
result = decode.searchfile(f)
  File "/opt/etext/lib/python2.4/site-packages/etext/decode.py", line
43, in searchfile
return Email(f)
  File "/opt/etext/lib/python2.4/site-packages/etext/decode.py", line
510, in __init__
self.child.append(Email(mf))
  File "/opt/etext/lib/python2.4/site-packages/etext/decode.py", line
404, in __init__
msg = Parser().parse(f)
  File "/opt/etext/lib/python2.4/email/Parser.py", line 65, in parse
data = fp.read(8192)
TypeError: read() takes exactly 1 argument (2 given)

Thanks,
Andre.

-- 

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