awslabs / awslabs/aws-shell

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

Open
#107 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
7.3k
Forks
780
PR merge metrics
No merged PRs in 30d

Description

$ 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

Contributor guide

Open the contributing guide

Research direction

Start with awsshell/utils.py at remove_html and follow its caller in awsshell/makeindex.py, especially the indexing path shown in the traceback. Reproduce the first-run aws-shell failure on the reported Python 2.6 environment, then verify that autocomplete index creation completes without the HTMLParser exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.