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 20:29:51 2011] [error] [client 192.168.1.9] File "/home/dev/wsgi-scripts/response.py", line 33, in application [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] return handler.do(environ, start_response) [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] File "/home/dev/wsgi-scripts/response.py", line 15, in do [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] html += name [Wed Jun 08 20:29:51 2011] [error] [client 192.168.1.9] 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 does not display the value of the variable 'name' entered in the respective form. Thank Nitin _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor