A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mail-archive.com/html5lib-discuss@googlegroups.com/msg00238.html below:

NameError on binary input including meta@charset since r1233

Status: Accepted
Owner: ----

New issue 84 by geoffers: NameError on binary input including m...@charset  
since r1233
http://code.google.com/p/html5lib/issues/detail?id=84
What steps will reproduce the problem?
cat "<meta charset=utf-8>" > foo
python parse.py foo

What is the expected output?
<html><head><meta charset=utf-8>
</head><body></body></html>

What do you see instead?
Traceback (most recent call last):
   File "parse.py", line 195, in <module>
     parse()
   File "parse.py", line 79, in parse
     document = parseMethod(f, encoding=encoding)
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 150, in parse
     self._parse(stream, innerHTML=False, encoding=encoding)
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 125, in
_parse
     method(token["name"], token["data"])
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 446, in
processStartTag
     self.parser.phase.processStartTag(name, attributes)
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 481, in
processStartTag
     self.parser.phase.processStartTag(name, attributes)
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 299, in
processStartTag
     self.startTagHandler[name](name, attributes)
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 521, in
startTagOther
     self.parser.phase.processStartTag(name, attributes)
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 299, in
processStartTag
     self.startTagHandler[name](name, attributes)
   File "/Users/gsnedders/Documents/Stuff I'm Working  
On/html5lib/python/src/html5lib/html5parser.py", line 588, in
startTagMeta
     codec = inputstream.codecName(atributes["charset"])
NameError: global name 'inputstream' is not defined

Who do I blame?
I blame jgraham's not quite suitably 1337 hacking skillz, for managing to  
call a module not imported and misspell
"attributes" on one line, and call a method that doesn't exist in the next  
(|if it weren't for that, it would be easier to fix, and I
might bother). :)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"html5lib-discuss" group.
 To post to this group, send email to html5lib-discuss@googlegroups.com
 To unsubscribe from this group, send email to 
html5lib-discuss+unsubscr...@googlegroups.com
 For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB
-~----------~----~----~----~------~----~------~--~---


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4