Re: Trying to write beautifulsoup result to a file and get error message

2011-11-14 Thread Andreas Perstinger
On 2011-11-13 23:37, goldtech wrote: If I try: ... soup = BeautifulSoup(ft3) f = open(r'c:\NewFolder\clean4.html', "w") f.write(soup) f.close() I get error message: Traceback (most recent call last): File "C:\Documents and Settings\user01\Desktop\py\tb1a.py", line 203, in f.write(soup)

Re: Trying to write beautifulsoup result to a file and get error message

2011-11-13 Thread MRAB
On 13/11/2011 22:37, goldtech wrote: If I try: ... soup = BeautifulSoup(ft3) f = open(r'c:\NewFolder\clean4.html', "w") f.write(soup) f.close() I get error message: Traceback (most recent call last): File "C:\Documents and Settings\user01\Desktop\py\tb1a.py", line 203, in f.write(soup)

Trying to write beautifulsoup result to a file and get error message

2011-11-13 Thread goldtech
If I try: ... soup = BeautifulSoup(ft3) f = open(r'c:\NewFolder\clean4.html', "w") f.write(soup) f.close() I get error message: Traceback (most recent call last): File "C:\Documents and Settings\user01\Desktop\py\tb1a.py", line 203, in f.write(soup) TypeError: expected a character buffer o