Re: [Tutor] lxml.html

2011-06-09 Thread Walter Prins
Hello Nitin, On 9 June 2011 15:10, nitin chandra wrote: > The following is the html code in index.py > > html = "C Informatics" > html += "Hospital Management & Information > System" > html += '' > html += '' > html += '' > html += '' > htm

Re: [Tutor] lxml.html

2011-06-09 Thread nitin chandra
Sorry, did not realise , on clicking "Reply", I was mailing only to you. Thank you for pointing that out. Duly complied. TypeError: cannot concatenate 'str' and 'NoneType' objects >> I am extracting form field name / value from an html, but then it gives the above error and do

Re: [Tutor] lxml.html

2011-06-08 Thread Steven D'Aprano
nitin chandra wrote to me off-list. I've taken the liberty of returning the conversation to the mailing list. Hi, ERROR [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] Traceback (most recent call last): What is all this extraneous date/error/ip address nonsense in the traceback? Wher

Re: [Tutor] lxml.html

2011-06-08 Thread Joel Goldstick
On Wed, Jun 8, 2011 at 11:49 AM, Jerry Hill wrote: > On Wed, Jun 8, 2011 at 11:20 AM, nitin chandra > wrote: > > Hello Every One, > > > > doc = > lxml.html.parse('/home/dev/wsgi-scripts/index.py').getroot() > > Is index.py really an XML document? If so, it's named pretty oddly... > > --

Re: [Tutor] lxml.html

2011-06-08 Thread Jerry Hill
On Wed, Jun 8, 2011 at 11:20 AM, nitin chandra wrote: > Hello Every One, > >         doc = lxml.html.parse('/home/dev/wsgi-scripts/index.py').getroot() Is index.py really an XML document? If so, it's named pretty oddly... -- Jerry ___ Tutor maillist

Re: [Tutor] lxml.html

2011-06-08 Thread Steven D'Aprano
nitin chandra wrote: Hello Every One, doc = lxml.html.parse('/home/dev/wsgi-scripts/index.py').getroot() name = doc.forms[0].fields['name'] html = 'name is ' html += name ERROR [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] Traceback (most recent ca

[Tutor] lxml.html

2011-06-08 Thread nitin chandra
Hello Every One, doc = lxml.html.parse('/home/dev/wsgi-scripts/index.py').getroot() name = doc.forms[0].fields['name'] html = 'name is ' html += name ERROR [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] Traceback (most recent call last): [Wed Jun 08 2