| <class 'HTMLParser.HTMLParseError'> | Python 2.6.2: /usr/www/users/stlpartn/stlpartners.com/telco2_online-video-distribution/../../_virtualenv/bin/python Sat Mar 20 08:34:25 2010 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /usr/www/users/stlpartn/stlpartners.com/telco2_online-video-distribution/register.cgi in |
| 40 registration.DiscountCode('VIP942', lambda v: Decimal(0.75) * v if date.today() < date(2008, 10, 1) else Decimal(0.9) * v), |
| 41 ) |
| 42 |
| 43 if __name__ == "__main__": |
| 44 registration.FormHandler(Form()).run_with_cgi() |
| registration = <module 'stl.registration' from '/usr/www/users/stlpartn/stl/registration.py'>, registration.FormHandler = <class 'stl.registration.FormHandler'>, Form = <class '__main__.Form'>, ).run_with_cgi undefined |
| /usr/www/users/stlpartn/stl/registration.py in run_with_cgi(self=<stl.registration.FormHandler object at 0x28d18f6c>, testmode=False) |
| 933 |
| 934 def run_with_cgi(self, testmode=False): |
| 935 return pesto.run_with_cgi(self.wsgiapp(testmode)) |
| 936 |
| 937 |
| global pesto = <module 'pesto' from '/usr/www/users/stlpartn/_v...-packages/pesto-12-py2.6.egg/pesto/__init__.pyc'>, pesto.run_with_cgi = <function run_with_cgi at 0x28b76994>, self = <stl.registration.FormHandler object at 0x28d18f6c>, self.wsgiapp = <bound method FormHandler.wsgiapp of <stl.registration.FormHandler object at 0x28d18f6c>>, testmode = False |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/pesto-12-py2.6.egg/pesto/wsgiutils.py in run_with_cgi(application=<function sessionmanager_middleware at 0x28d1b64c>, environ={'DOCUMENT_ROOT': '/usr/www/users/stlpartn/stlpartners.com', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.stlpartners.com', 'HTTP_PRAGMA': 'no-cache', ...}) |
| 669 result = application(environ, start_response) |
| 670 try: |
| 671 for data in result: |
| 672 if data: # don't send headers until body appears |
| 673 write(data) |
| data undefined, result = <pesto.wsgiutils.ClosingIterator object at 0x28d1cacc> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/pesto-12-py2.6.egg/pesto/wsgiutils.py in next(self=<pesto.wsgiutils.ClosingIterator object at 0x28d1cacc>) |
| 996 Return the next item from ``iterator`` |
| 997 """ |
| 998 return self._next() |
| 999 |
| 1000 def close(self): |
| self = <pesto.wsgiutils.ClosingIterator object at 0x28d1cacc>, self._next = <bound method PestoWSGIApplication.next of <pesto.core.PestoWSGIApplication object at 0x28d1cb0c>> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/pesto-12-py2.6.egg/pesto/core.py in next(self=<pesto.core.PestoWSGIApplication object at 0x28d1cb0c>) |
| 87 if self._content_iter is None: |
| 88 try: |
| 89 response = self._pesto_app(self.request, *self._app_args, **self._app_kwargs) |
| 90 self._content_iter = response(self.environ, self.start_response) |
| 91 except RequestParseError, e: |
| global response = <module 'pesto.response' from '/usr/www/users/st...-packages/pesto-12-py2.6.egg/pesto/response.pyc'>, self = <pesto.core.PestoWSGIApplication object at 0x28d1cb0c>, self._pesto_app = <function form_handler at 0x28d1b294>, self.request = <pesto.request.Request object at 0x28d1c06c>, self._app_args = (), self._app_kwargs = {} |
| /usr/www/users/stlpartn/stl/utils.py in decorated(*args=(<pesto.request.Request object at 0x28d1c06c>,), **kwargs={}) |
| 648 return result |
| 649 return Response( |
| 650 content = [result.render('xhtml')], |
| 651 **kwargs |
| 652 ) |
| content undefined, result = <genshi.core.Stream object at 0x2908886c>, result.render = <bound method Stream.render of <genshi.core.Stream object at 0x2908886c>> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/core.py in render(self=<genshi.core.Stream object at 0x2908886c>, method='xhtml', encoding='utf-8', out=None, **kwargs={}) |
| 177 method = self.serializer or 'xml' |
| 178 generator = self.serialize(method=method, **kwargs) |
| 179 return encode(generator, method=method, encoding=encoding, out=out) |
| 180 |
| 181 def select(self, path, namespaces=None, variables=None): |
| encode = <function encode at 0x28d47dbc>, generator = <generator object __call__ at 0x28dbccd4>, method = 'xhtml', encoding = 'utf-8', out = None |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/output.py in encode(iterator=<generator object __call__ at 0x28dbccd4>, method='xhtml', encoding='utf-8', out=None) |
| 58 _encode = lambda string: string |
| 59 if out is None: |
| 60 return _encode(u''.join(list(iterator))) |
| 61 for chunk in iterator: |
| 62 out.write(_encode(chunk)) |
| _encode = <function <lambda> at 0x28d1b79c>, u''.join undefined, builtin list = <type 'list'>, iterator = <generator object __call__ at 0x28dbccd4> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/output.py in __call__(self=<genshi.output.XHTMLSerializer object at 0x2909f8ac>, stream=<generator object __call__ at 0x28db3f2c>) |
| 309 for filter_ in self.filters: |
| 310 stream = filter_(stream) |
| 311 for kind, data, pos in stream: |
| 312 |
| 313 if kind is START or kind is EMPTY: |
| kind = 'TEXT', data = <Markup u'\n'>, pos = (u'base_report_form.html', 560, 0), stream = <generator object __call__ at 0x28db3f2c> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/output.py in __call__(self=<genshi.output.NamespaceFlattener object at 0x2909fd6c>, stream=<generator object __call__ at 0x28db3acc>) |
| 590 _gen_prefix = _gen_prefix().next |
| 591 |
| 592 for kind, data, pos in stream: |
| 593 |
| 594 if kind is START or kind is EMPTY: |
| kind = 'END_NS', data = '', pos = (u'base_report_form.html', 560, 0), stream = <generator object __call__ at 0x28db3acc> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/output.py in __call__(self=<genshi.output.WhitespaceFilter object at 0x2909f98c>, stream=<generator object __call__ at 0x28d46b44>, ctxt=None, space=QName(u'http://www.w3.org/XML/1998/namespace}space'), trim_trailing_space=<built-in method sub of _sre.SRE_Pattern object at 0x28d30620>, collapse_lines=<built-in method sub of _sre.SRE_Pattern object at 0x290aaf98>) |
| 696 push_text = textbuf.append |
| 697 pop_text = textbuf.pop |
| 698 for kind, data, pos in chain(stream, [(None, None, None)]): |
| 699 |
| 700 if kind is TEXT: |
| kind = 'TEXT', data = u'\n\n ', pos = ('/usr/www/users/stlpartn/stlpartners.com/telco2_online-video-distribution/register-form.html', 24, -1), global chain = <type 'itertools.chain'>, stream = <generator object __call__ at 0x28d46b44>, builtin None = None |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/output.py in __call__(self=<genshi.output.EmptyTagFilter object at 0x2909ff6c>, stream=<generator object _ensure at 0x287c0b6c>) |
| 530 def __call__(self, stream): |
| 531 prev = (None, None, None) |
| 532 for ev in stream: |
| 533 if prev[0] is START: |
| 534 if ev[0] is END: |
| ev = ('TEXT', u'\n\n ', ('/usr/www/users/stlpartn/stlpartners.com/telco2_online-video-distribution/register-form.html', 24, -1)), stream = <generator object _ensure at 0x287c0b6c> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/core.py in _ensure(stream=<generator object _ensure at 0x28d3be3c>) |
| 281 # unchanged |
| 282 yield event |
| 283 for event in stream: |
| 284 yield event |
| 285 |
| event = ('TEXT', u'\n\n ', ('/usr/www/users/stlpartn/stlpartners.com/telco2_online-video-distribution/register-form.html', 24, -1)), stream = <generator object _ensure at 0x28d3be3c> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/core.py in _ensure(stream=<generator object __call__ at 0x28d3be14>) |
| 281 # unchanged |
| 282 yield event |
| 283 for event in stream: |
| 284 yield event |
| 285 |
| event = ('TEXT', u'\n\n ', ('/usr/www/users/stlpartn/stlpartners.com/telco2_online-video-distribution/register-form.html', 24, -1)), stream = <generator object __call__ at 0x28d3be14> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/filters/html.py in __call__(self=<genshi.filters.html.HTMLFormFiller object at 0x28d2afec>, stream=<genshi.core.Stream object at 0x28d234cc>) |
| 75 no_option_value = False |
| 76 |
| 77 for kind, data, pos in stream: |
| 78 |
| 79 if kind is START: |
| kind = 'TEXT', data = u'\n\n ', pos = ('/usr/www/users/stlpartn/stlpartners.com/telco2_online-video-distribution/register-form.html', 24, -1), stream = <genshi.core.Stream object at 0x28d234cc> |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-freebsd-7.2-STABLE-i386.egg/genshi/template/base.py in _include(self=<MarkupTemplate "register-form.html">, stream=<generator object _match at 0x28d3bd9c>, ctxt=[{'errors': {}, 'form': <__main__.Form object at...uote_plus': <function quote_plus at 0x2873041c>}], **vars={}) |
| 579 try: |
| 580 tmpl = self.loader.load(href, relative_to=event[2][0], |
| 581 cls=cls or self.__class__) |
| 582 for event in tmpl.generate(ctxt, **vars): |
| 583 yield event |
| cls = <class 'genshi.template.markup.MarkupTemplate'>, self = <MarkupTemplate "register-form.html">, self.__class__ = <class 'genshi.template.markup.MarkupTemplate'> |
| /usr/www/users/stlpartn/stl/utils.py in load(self=<stl.utils.bsURITemplateLoader object at 0x28c97dcc>, uri=u'http://www.stlpartners.com/telco2_online-video-distribution/index.php', relative_to='register-form.html', cls=<class 'genshi.template.markup.MarkupTemplate'>, encoding='iso-8859-1') |
| 131 except (KeyError, AttributeError): |
| 132 encoding = 'iso-8859-1' |
| 133 soup = BeautifulSoup(f.read()) |
| 134 make_links_absolute(uri, soup) |
| 135 return cls(unicode(soup), filepath=None, filename=uri, loader=self, encoding=encoding) |
| soup undefined, BeautifulSoup = <class BeautifulSoup.BeautifulSoup at 0x28d319ec>, f = <addinfourl at 688991564 whose fp = None>, f.read = None |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/BeautifulSoup-3.1.0.1-py2.6.egg/BeautifulSoup.py in __init__(self=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...e a/b tracker --> <script></script></head></html>, *args=('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...test");\n}catch(err){}</script>\n\n</body>\n</html>\n\n',), **kwargs={'isHTML': True, 'smartQuotesTo': 'html'}) |
| 1497 kwargs['smartQuotesTo'] = self.HTML_ENTITIES |
| 1498 kwargs['isHTML'] = True |
| 1499 BeautifulStoneSoup.__init__(self, *args, **kwargs) |
| 1500 |
| 1501 SELF_CLOSING_TAGS = buildTagMap(None, |
| global BeautifulStoneSoup = <class BeautifulSoup.BeautifulStoneSoup at 0x28d3195c>, BeautifulStoneSoup.__init__ = <unbound method BeautifulStoneSoup.__init__>, self = <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...e a/b tracker --> <script></script></head></html>, args = ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...test");\n}catch(err){}</script>\n\n</body>\n</html>\n\n',), kwargs = {'isHTML': True, 'smartQuotesTo': 'html'} |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/BeautifulSoup-3.1.0.1-py2.6.egg/BeautifulSoup.py in __init__(self=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...e a/b tracker --> <script></script></head></html>, markup='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...test");\n}catch(err){}</script>\n\n</body>\n</html>\n\n', parseOnlyThese=None, fromEncoding=None, markupMassage=True, smartQuotesTo='html', convertEntities=None, selfClosingTags=None, isHTML=True, builder=<class BeautifulSoup.HTMLParserBuilder at 0x28d3192c>) |
| 1228 self.markupMassage = markupMassage |
| 1229 try: |
| 1230 self._feed(isHTML=isHTML) |
| 1231 except StopParsing: |
| 1232 pass |
| self = <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...e a/b tracker --> <script></script></head></html>, self._feed = <bound method BeautifulSoup._feed of <!DOCTYPE h... a/b tracker --> <script></script></head></html>>, isHTML = True |
| /usr/www/users/stlpartn/_virtualenv/lib/python2.6/site-packages/BeautifulSoup-3.1.0.1-py2.6.egg/BeautifulSoup.py in _feed(self=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...e a/b tracker --> <script></script></head></html>, inDocumentEncoding=None, isHTML=True) |
| 1261 self.builder.reset() |
| 1262 |
| 1263 self.builder.feed(markup) |
| 1264 # Close out any unfinished strings and close all the open tags. |
| 1265 self.endData() |
| self = <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...e a/b tracker --> <script></script></head></html>, self.builder = <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, self.builder.feed = <bound method HTMLParserBuilder.feed of <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>>, markup = u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...test");\n}catch(err){}</script>\n\n</body>\n</html>\n\n' |
| /usr/local/lib/python2.6/HTMLParser.py in feed(self=<BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, data=u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...test");\n}catch(err){}</script>\n\n</body>\n</html>\n\n') |
| 106 """ |
| 107 self.rawdata = self.rawdata + data |
| 108 self.goahead(0) |
| 109 |
| 110 def close(self): |
| self = <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, self.goahead = <bound method HTMLParserBuilder.goahead of <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>> |
| /usr/local/lib/python2.6/HTMLParser.py in goahead(self=<BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, end=0) |
| 148 k = self.parse_starttag(i) |
| 149 elif startswith("</", i): |
| 150 k = self.parse_endtag(i) |
| 151 elif startswith("<!--", i): |
| 152 k = self.parse_comment(i) |
| k = 1151, self = <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, self.parse_endtag = <bound method HTMLParserBuilder.parse_endtag of ...ulSoup.HTMLParserBuilder instance at 0x291129cc>>, i = 1720 |
| /usr/local/lib/python2.6/HTMLParser.py in parse_endtag(self=<BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, i=1720) |
| 312 match = endtagfind.match(rawdata, i) # </ + tag + > |
| 313 if not match: |
| 314 self.error("bad end tag: %r" % (rawdata[i:j],)) |
| 315 tag = match.group(1) |
| 316 self.handle_endtag(tag.lower()) |
| self = <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, self.error = <bound method HTMLParserBuilder.error of <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>>, rawdata = u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...test");\n}catch(err){}</script>\n\n</body>\n</html>\n\n', i = 1720, j = 1732 |
| /usr/local/lib/python2.6/HTMLParser.py in error(self=<BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, message='bad end tag: u"</sc\'+\'ript>"') |
| 113 |
| 114 def error(self, message): |
| 115 raise HTMLParseError(message, self.getpos()) |
| 116 |
| 117 __starttag_text = None |
| global HTMLParseError = <class 'HTMLParser.HTMLParseError'>, message = 'bad end tag: u"</sc\'+\'ript>"', self = <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>, self.getpos = <bound method HTMLParserBuilder.getpos of <BeautifulSoup.HTMLParserBuilder instance at 0x291129cc>> |
<class 'HTMLParser.HTMLParseError'>: bad end tag: u"</sc'+'ript>", at line 21, column 43
args =
()
lineno =
21
message =
''
msg =
'bad end tag: u"</sc\'+\'ript>"'
offset =
42