awslabs / aws-shell

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

ImportError: cannot import name 'loaders' on startup #25

Closed donnemartin closed 8 years ago

donnemartin commented 8 years ago

@jamesls I don't see the loaders module included in f709ba0d5d0081a5b3e67f57d27ab134d6a8d3e7, seems to be causing this issue:

$ aws-shell
Traceback (most recent call last):
  File "/Users/donnemartin/.virtualenvs/aws-shell3/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.0.1', 'console_scripts', 'aws-shell')()
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/__init__.py", line 12, in <module>
    from awsshell import loaders
ImportError: cannot import name 'loaders'
jamesls commented 8 years ago

Ah good catch, I'll update this.

donnemartin commented 8 years ago

Thanks for the fix James. I can hook up a pexpect unit test to catch related errors. Here's an example of what I'm thinking:

https://github.com/donnemartin/saws/blob/master/tests/test_cli.py

Note pexpect doesn't run on Windows, but that's probably fine since we're probably going to be running on Travis. If we use something like AppVeyor we'd need to hook up something like WExpect.

jamesls commented 8 years ago

I'd ideally like to find an approach that works on both linux/windows without much trouble. I don't remember if it was WExpect that I've used before, but I do remember running problems getting any kind of expect-like python library working on windows.

I think the issue right now is I can't hook this up to travis CI until this goes public so I don't have the usual travis CI checks I'm use to. I'm hoping this problem goes away shortly.