donnemartin / saws

A supercharged AWS command line interface (CLI).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto-complete for AWS resource not being populated

abdulirfan3 opened this issue · comments

Hello,

Great tool helps me a lot. But looks like i have issue with auto-complete for AWS resource like instance-id, bucket name...See image below. I try using tab too but no luck...the ~/.sawsrc file is the default file(i have not changed anything). I have also tried hitting the refresh(F5) and still nothing...

image

@abdulirfan3 thanks for the bug report, I'll try to help you get up and running.

What OS and what version of Python are you running? Did you install in a virtualenv?

Can you post the contents of your log file?

$ cat ~/.saws.log

@donnemartin

Here are the details as requested, Sorry for the delay...

ip-10-22-238-24:# uname -a
Linux ip-10-22-238-24.domain.com 2.6.32-504.30.3.el6.x86_64 #1 SMP Thu Jul 9 15:20:47 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
ip-10-22-238-24:
#
ip-10-22-238-24:# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
ip-10-22-238-24:
# cat /.saws.log
2015-10-15 13:58:09,855 (2075/MainThread) saws.saws ERROR - traceback: 'Traceback (most recent call last):\n File "/usr/lib/python2.6/site-packages/saws/'
2015-10-15 13:58:09,855 (2075/MainThread) saws.saws ERROR - traceback: 'Traceback (most recent call last):\n File "/usr/lib/python2.6/site-packages/saws/'
2015-10-15 13:58:09,855 (2075/MainThread) saws.saws ERROR - traceback: 'Traceback (most recent call last):\n File "/usr/lib/python2.6/site-packages/saws/'
2015-10-15 13:58:09,855 (2075/MainThread) saws.saws ERROR - traceback: 'Traceback (most recent call last):\n File "/usr/lib/python2.6/site-packages/saws/'
ip-10-22-238-24:
#

@donnemartin

any update on this?

I may have a similar issue: SAWS wants to auto-complete resources from AWS ACCOUNT A while I'm actively using AWS ACCOUNT B.

I'm attempting to tell awscli which credentials to leverage via shell variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. The "aws" commands work perfectly, even though autocomplete is pointing at an entirely different account.

Shouldn't SAWS follow the same precedence that AWSCLI does?

Or is SAWS getting a token for future use, and caching that somewhere?

@abdulirfan3 unfortunately the log seems to be obscuring some information, I might need to fix the logging for this case. Can you try these to see if they fix the issue?

  • 0.3.2 is now on PyPI which fixes a number of issues and reworks some of the resource completion code. The screenshot shows the 0.2.1 version. Can you try the latest SAWS?
  • I've had to squash a few Python 2.6 specific bugs so that might be another flag. If you have access to 2.7 or 3.3+ could you try a more recent version?
  • Are you installing in a virtualenv? Instructions are here.

If none of these work I might need to send you a special build off-list to help diagnose, thanks.

@zapman449 I think what you're seeing is a different issue and might be related to #16.

Can you check out that ticket and see if that fixes your problem? If not, do you mind filing a separate bug? Thanks.

@donnemartin

thank you for the follow up, I still have the same issue. I installed the latest version(0.3.2) and still the same issue. As far as python I am still using 2.6 as that is our default on all the servers and we cannot change that for now. Also I am installing virtualenv.

Please send me the special build-off and we can take it from there..

@abdulirfan3 ok thanks for trying the steps.

Also I am installing virtualenv.

It sounds like you are already installing in a virtualenv or do you mean you will try this route?

I'll try to have something over the weekend--I'll post here a dev build for you to download and run to get a better stack traceback.

@donnemartin

I am already installing virtulenv..

Thank you

@abdulirfan3 sorry been tied up recently and haven't been able to get you a 'debug' build. I'll try this week.

@abdulirfan3 just touching base, it's been awhile. I can start working on giving you a build if you're still up for it. Just let me know, thanks!