awslabs / aws-shell

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

HTMLParseError on first run using Python 2.7.1 #190

Closed jgrimard closed 6 years ago

jgrimard commented 6 years ago

I am receiving the below error after installing and running aws-shell for the first time in Windows 7 using Python 2.7.1 Is there a fix or workaround for this error? I would really like to use this program.

C:\>pip install aws-shell
Collecting aws-shell
  Using cached aws_shell-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: awscli<2.0.0,>=1.10.30 in c:\python27\lib\site-packages (from aws-shell)
Requirement already satisfied: prompt-toolkit<1.1.0,>=1.0.0 in c:\python27\lib\site-packages (from aws-shell)
Requirement already satisfied: Pygments<3.0.0,>=2.1.3 in c:\python27\lib\site-packages (from aws-shell)
Requirement already satisfied: configobj<6.0.0,>=5.0.6 in c:\python27\lib\site-packages (from aws-shell)
Requirement already satisfied: boto3<2.0.0,>=1.2.1 in c:\python27\lib\site-packages (from aws-shell)
Requirement already satisfied: docutils>=0.10 in c:\python27\lib\site-packages (from awscli<2.0.0,>=1.10.30->aws-shell)
Requirement already satisfied: colorama<=0.3.7,>=0.2.5 in c:\python27\lib\site-packages (from awscli<2.0.0,>=1.10.30->aw
s-shell)
Requirement already satisfied: botocore==1.8.2 in c:\python27\lib\site-packages (from awscli<2.0.0,>=1.10.30->aws-shell)

Requirement already satisfied: s3transfer<0.2.0,>=0.1.9 in c:\python27\lib\site-packages (from awscli<2.0.0,>=1.10.30->a
ws-shell)
Requirement already satisfied: rsa<=3.5.0,>=3.1.2 in c:\python27\lib\site-packages (from awscli<2.0.0,>=1.10.30->aws-she
ll)
Requirement already satisfied: PyYAML<=3.12,>=3.10 in c:\python27\lib\site-packages (from awscli<2.0.0,>=1.10.30->aws-sh
ell)
Requirement already satisfied: wcwidth in c:\python27\lib\site-packages (from prompt-toolkit<1.1.0,>=1.0.0->aws-shell)
Requirement already satisfied: six>=1.9.0 in c:\python27\lib\site-packages (from prompt-toolkit<1.1.0,>=1.0.0->aws-shell
)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\python27\lib\site-packages (from boto3<2.0.0,>=1.2.1->aws-sh
ell)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\python27\lib\site-packages (from botocore==1.8.2->awscl
i<2.0.0,>=1.10.30->aws-shell)
Requirement already satisfied: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in c:\python27\
lib\site-packages (from s3transfer<0.2.0,>=0.1.9->awscli<2.0.0,>=1.10.30->aws-shell)
Requirement already satisfied: pyasn1>=0.1.3 in c:\python27\lib\site-packages (from rsa<=3.5.0,>=3.1.2->awscli<2.0.0,>=1
.10.30->aws-shell)
Installing collected packages: aws-shell
Successfully installed aws-shell-0.2.0

C:\>aws-shell
First run, creating autocomplete index...
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\aws-shell.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\awsshell\__init__.py", line 47, in main
    write_index(index_file)
  File "c:\python27\lib\site-packages\awsshell\makeindex.py", line 67, in write_index
    index_command(current, help_command)
  File "c:\python27\lib\site-packages\awsshell\makeindex.py", line 59, in index_command
    index_command(child, sub_help_command)
  File "c:\python27\lib\site-packages\awsshell\makeindex.py", line 59, in index_command
    index_command(child, sub_help_command)
  File "c:\python27\lib\site-packages\awsshell\makeindex.py", line 40, in index_command
    arg_obj.documentation.split('\n')[0])
  File "c:\python27\lib\site-packages\awsshell\utils.py", line 22, in remove_html
    s.feed(html)
  File "c:\python27\lib\HTMLParser.py", line 108, in feed
    self.goahead(0)
  File "c:\python27\lib\HTMLParser.py", line 148, in goahead
    k = self.parse_starttag(i)
  File "c:\python27\lib\HTMLParser.py", line 229, in parse_starttag
    endpos = self.check_for_whole_start_tag(i)
  File "c:\python27\lib\HTMLParser.py", line 304, in check_for_whole_start_tag
    self.error("malformed start tag")
  File "c:\python27\lib\HTMLParser.py", line 115, in error
    raise HTMLParseError(message, self.getpos())
HTMLParser.HTMLParseError: malformed start tag, at line 1, column 275

C:\>python --version
Python 2.7.1

C:\>
jgrimard commented 6 years ago

Nevermind. I upgraded to python 2.7.14 by downloading the msi directly from the python website and everything is working perfectly now.