awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.15k stars 770 forks source link

Cannot start aws-shell, HTMLParser.HTMLParseError: unknown declaration #107

Open felibb opened 8 years ago

felibb commented 8 years ago

$ python Python 2.6.9 (unknown, Apr 1 2015, 18:16:00) [GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2

$ cat /etc/issue Amazon Linux AMI release 2015.03

$ aws-shell First run, creating autocomplete index... Traceback (most recent call last): File "/usr/local/bin/aws-shell", line 9, in load_entry_point('aws-shell==0.1.0', 'console_scripts', 'aws-shell')() File "/usr/local/lib/python2.6/site-packages/awsshell/init.py", line 47, in main write_index(index_file) File "/usr/local/lib/python2.6/site-packages/awsshell/makeindex.py", line 63, in write_index index_command(current, help_command) File "/usr/local/lib/python2.6/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/usr/local/lib/python2.6/site-packages/awsshell/makeindex.py", line 55, in index_command index_command(child, sub_help_command) File "/usr/local/lib/python2.6/site-packages/awsshell/makeindex.py", line 40, in index_command arg_obj.documentation.split('\n')[0]) File "/usr/local/lib/python2.6/site-packages/awsshell/utils.py", line 22, in remove_html s.feed(html) File "/usr/lib64/python2.6/HTMLParser.py", line 108, in feed self.goahead(0) File "/usr/lib64/python2.6/HTMLParser.py", line 156, in goahead k = self.parse_declaration(i) File "/usr/lib64/python2.6/markupbase.py", line 96, in parse_declaration return self.parse_marked_section(i) File "/usr/lib64/python2.6/markupbase.py", line 161, in parse_marked_section self.unknown_decl(rawdata[i+3: j]) File "/usr/lib64/python2.6/HTMLParser.py", line 361, in unknown_decl self.error("unknown declaration: %r" % (data,)) File "/usr/lib64/python2.6/HTMLParser.py", line 115, in error raise HTMLParseError(message, self.getpos()) HTMLParser.HTMLParseError: unknown declaration: u'CDATA[&', at line 1, column 213

jamesls commented 8 years ago

Looks like an issue only on python2.6: http://bugs.python.org/issue13358

The patch from the linked issue doesn't seem easy to backport in a safe way. I'll need to see what other options we have to strip out html.

Thanks for reporting.

ghost commented 8 years ago

So #108 is closed and this is closed. I take it this means that this will not be resolved...in any event my system throws the identical error.