Code Monkey home page Code Monkey logo

atom-autocomplete-ansible's People

Contributors

antikythera avatar dnorthup-ums avatar h-hirokawa avatar kogent avatar sadovnychyi avatar smiller171 avatar zigarn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-autocomplete-ansible's Issues

Failed to activate the autocomplete-ansible package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.27.2 x64
Electron: 1.7.15
OS: "Fedora release
Thrown From: autocomplete-ansible package 0.1.22

Stack Trace

Failed to activate the autocomplete-ansible package

At Cannot find module 'fuzzaldrin'

Error: Cannot find module 'fuzzaldrin'
    at Module._resolveFilename (module.js:470:15)
    at Module._resolveFilename (/usr/share/atom/resources/electron.asar/common/r
/usr/share/atom/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/usr/share/atom/resources/app/src/module-cache.js:354:58)
    at Module.require (/app.asar/static/index.js:40:43)
    at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-autocomplete-ansible/libs/provider.js:4:30)
    at /packages/atom-autocomplete-ansible/libs/provider.js:201:2)
    at Module.get_Module._compile (/usr/share/atom/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (/usr/share/atom/resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-autocomplete-ansible/libs/main.js:7:17)
    at /packages/atom-autocomplete-ansible/libs/main.js:42:2)
    at Module.get_Module._compile (/usr/share/atom/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (/usr/share/atom/resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (/usr/share/atom/resources/app/static/<embedded>:96:26)
    at Package.requireMainModule (/usr/share/atom/resources/app/src/package.js:782:33)
    at Package.activateNow (/usr/share/atom/resources/app/src/package.js:220:40)
    at measure (/usr/share/atom/resources/app/src/package.js:206:33)
    at Package.measure (/usr/share/atom/resources/app/src/package.js:88:25)
    at activationPromise.Promise (/usr/share/atom/resources/app/src/package.js:200:20)
    at Promise (<anonymous>)

Commands

Non-Core Packages

ansi-to-utf8 0.4.0 
ansible-galaxy 0.2.1 
ansible-galaxy-plus 1.1.4 
ansible-snippets 0.2.0 
autocomplete-ansible 0.1.22 
atom-autocomplete-php 0.25.6 
fetch 0.3.0 
jQuery 1.2.6 
atom-linter-phpstan 1.0.1 
show-invisibles-plus 0.3.1 
atom-solidity-linter 0.0.11 
atom-tab-close-always-visible 1.1.0 
autocomplete-ansible 0.1.22 
autocomplete-modules 2.0.0 
browser-plus 0.0.98 
busy-signal 1.4.3 
custom-invisibles 0.1.2 
Ensime 0.41.0 
fuzzaldrin 2.1.0 
Hydrogen 2.5.0 
hyperclick 0.1.5 
intentions 1.1.5 
language-ansi 1.1.1 
language-ansible 0.2.2 
language-ansible 0.2.2 
language-mode-transitional 0.0.2 
language-scala 1.1.9 
leak-detector 0.2.1 
linter 2.2.0 
linter-ansible-syntax 1.2.0 
linter-flexible-survival 3.6.0 
linter-ui-default 1.7.1 
regex-railroad-diagram 0.19.4 
transition-grammar 0.3.1 

RuntimeError: maximum recursion depth exceeded

Hello,

I'm using Atom 1.12.7, autocomplete-ansible 0.1.10 and Ansible 2.2.0.0 (all on Debian Linux, issue happens both in jessie and stretch releases) and unfortunately can't get your plugin to work. Every time I open a yaml file I get an error pop-up (contents below). My ansible is installed using pip and I've tried reinstalling (after removing first) it just in case seeing as the recursive loop seems to happen in the ansible code rather than yours but that didn't help. Do let me know if there's any more info I can provide.

autocomplete-python traceback output:
Command failed: /usr/bin/python /home/solid/.atom/packages/autocomplete-ansible/lib/parse_ansible.py
Traceback (most recent call last):
  File "/home/solid/.atom/packages/autocomplete-ansible/lib/parse_ansible.py", line 68, in <module>
    main()
  File "/home/solid/.atom/packages/autocomplete-ansible/lib/parse_ansible.py", line 25, in main
    doc_cli.find_modules(path)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 150, in find_modules
    self.find_modules(module)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 150, in find_modules
    self.find_modules(module)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 150, in find_modules
    self.find_modules(module)
(...)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 150, in find_modules
    self.find_modules(module)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 150, in find_modules
    self.find_modules(module)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 150, in find_modules
    self.find_modules(module)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 150, in find_modules
    self.find_modules(module)
  File "/usr/local/lib/python2.7/dist-packages/ansible/cli/doc.py", line 145, in find_modules
    if os.path.isdir(path):
  File "/usr/lib/python2.7/genericpath.py", line 52, in isdir
    return stat.S_ISDIR(st.st_mode)
  File "/usr/lib/python2.7/stat.py", line 41, in S_ISDIR
    return S_IFMT(mode) == S_IFDIR
RuntimeError: maximum recursion depth exceeded

edit: removed some of the repeated lines in the stacktrace

Command failed: parse_ansible.py

Command failed: /home/william/.atom/packages/autocomplete-ansible/lib/parse_ansible.py
[DEPRECATION WARNING]: docker is kept for backwards compatibility but usage is
discouraged. The module documentation details page may explain more about this
rationale..
This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Traceback (most recent call last):
File "/home/william/.atom/packages/autocomplete-ansible/lib/parse_ansible.py", line 64, in
main()
File "/home/william/.atom/packages/autocomplete-ansible/lib/parse_ansible.py", line 56, in main
for lookup in lookup_loader.all():
File "/usr/lib/python2.7/dist-packages/ansible/plugins/init.py", line 389, in all
self._module_cache[path] = self._load_module_source(name, path)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/init.py", line 324, in _load_module_source
module = imp.load_source(name, path, module_file)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/lookup/filetree.py", line 35, in
from main import display
ImportError: cannot import name display

Uncaught SyntaxError: Invalid regular expression: /^\s*-?\s (action\s*:\s |local_action\s*:\s |):...

[Enter steps to reproduce below:]

editing line:

  • { role: hadoop-users, tags: []}

Atom Version: 1.11.1
Electron Version: 0.37.8
System: Mac OS X 10.11.6
Thrown From: autocomplete-ansible package, v0.1.5

Stack Trace

Uncaught SyntaxError: Invalid regular expression: /^\s_-?\s (action\s_:\s |local_action\s*:\s |): [$/: Unterminated character class

At /Users/dimitry/.atom/packages/autocomplete-ansible/lib/provider.js:77

SyntaxError: Invalid regular expression: /^\s*-?\s (action\s*:\s |local_action\s*:\s |): [$/: Unterminated character class
    at RegExp (native)
    at Provider.getSuggestions (/Users/dimitry/.atom/packages/autocomplete-ansible/lib/provider.js:77:22)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:325:56
    at Array.forEach (native)
    at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:304:17)
    at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
    at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:291:19)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61

Commands

  4x -1:49.8.0 core:delete (atom-text-editor.editor.is-focused)
     -1:46.7.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.autocomplete-active)
  4x -1:46.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -1:43.7.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
  3x -1:43.3.0 core:move-right (atom-text-editor.editor.is-focused)
     -1:42.2.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
     -1:41.4.0 core:select-left (atom-text-editor.editor.is-focused)
     -1:40.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:07.5.0 core:paste (atom-text-editor.editor.is-focused)
     -0:50.4.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:50.4.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:50.4.0 editor:indent (atom-text-editor.editor.is-focused)
  2x -0:48 core:save (atom-text-editor.editor.is-focused)
  2x -0:19.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:18.4.0 editor:newline (atom-text-editor.editor.is-focused)
  8x -0:09.9.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)

Config

{
  "core": {
    "telemetryConsent": "limited"
  }
}

Installed Packages

# User
ansible-snippets, v0.2.0 (inactive)
ansible-vault, v0.2.5 (inactive)
autocomplete-ansible, v0.1.5 (active)
local-history, v3.4.1 (active)
merge-conflicts, v1.4.4 (active)
split-diff, v1.0.5 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.2.0 (inactive)
base16-tomorrow-light-theme, v1.2.0 (inactive)
one-dark-ui, v1.6.0 (active)
one-light-ui, v1.6.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.7.0 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.201.1 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.59.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v1.0.0 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.68.2 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.101.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.209.3 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

Travis migration

@h-hirokawa It looks like the Travis config (Webhook?) here either needs to be disabled or migrated to Travis-CI.com (from their .org). As I don't have access to the settings for this repo, I can't make the change for you.

parse_ansible.py failed "The lookup aws_account_attribute requires boto3 and botocore"

I don't succeed to use atom-autocomplete-ansible in Atom. I have the following output on Atom 1.25.0 with atom-autocomplete-ansible 0.1.18

Command failed: "/usr/bin/python" "/home/sebastien/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
Traceback (most recent call last):
  File "/home/sebastien/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 86, in <module>
    main()
  File "/home/sebastien/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 78, in main
    for lookup in lookup_loader.all():
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/loader.py", line 435, in all
    module = self._load_module_source(name, path)
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/loader.py", line 346, in _load_module_source
    module = imp.load_source(full_name, path, module_file)
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/lookup/aws_account_attribute.py", line 61, in <module>
    raise AnsibleError("The lookup aws_account_attribute requires boto3 and botocore.")
ansible.errors.AnsibleError: The lookup aws_account_attribute requires boto3 and botocore.

Ubuntu 17.10.0 (artful)
ansible --version

ansible 2.5.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/sebastien/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]

autocomplete failed on mac OS X 10.11.4

Command failed: "/usr/local/bin/python" "/Users/kenneyhe/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
expect:
installation and work

actual:
Traceback (most recent call last):
File "/Users/kenneyhe/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 9, in
from ansible.cli.doc import DocCLI
File "/usr/local/lib/python2.7/site-packages/ansible/cli/init.py", line 35, in
from ansible import constants as C
File "/usr/local/lib/python2.7/site-packages/ansible/constants.py", line 161, in
DEFAULT_LOCAL_TMP = get_config(p, DEFAULTS, 'local_tmp', 'ANSIBLE_LOCAL_TEMP', '$HOME/.ansible/tmp', istmppath=True)
File "/usr/local/lib/python2.7/site-packages/ansible/constants.py", line 81, in get_config
makedirs_safe(value, 0o700)
File "/usr/local/lib/python2.7/site-packages/ansible/utils/path.py", line 67, in makedirs_safe
raise AnsibleError("Unable to create local directories(%s): %s" % (to_native(rpath), to_native(e)))
ansible.errors.AnsibleError: Unable to create local directories(/$HOME/.ansible/tmp): [Errno 13] Permission denied: '/$HOME'

steps to repo:
install ansible autocomplete 0.1.24
open yams
select ansible advance

autocomplete-ansible unable to import ansible.

When I install this package it shows me the following warning and it doesn't work either. I installed ansible using homebrew "brew install ansible". Mac OS X El Capitan.

autocomplete-ansible unable to import ansible.
Install ansible using pip.

autocomplete-ansible unable to import ansible

When I start atom, I got this message:

autocomplete-ansible unable to import ansible.
Install ansible using pip.

With:

ansible --version
ansible 2.4.3.0
  config file = /home/user/PROJECT_PATH/ansible.cfg
  configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]

PROJECT_PATH is the PATH to my Project.

With:

head -1 /usr/local/bin/ansible
#!/usr/bin/python

For me it seams all ok or I lost somthing?

By the way, my os is Ubuntu 17.10.

Thanks

kraeml

I get this every time I open ansible file in atom

I get this every time I open ansible file in atom.
Is there a way fix it?
Command failed: undefined "C:\Users\jchadward.atom\packages\autocomplete-ansible\lib/parse_ansible.py"
'undefined' is not recognized as an internal or external command,
operable program or batch file.

Failed on ansible 2.5

I got this on ansible 2.5

utocomplete-ansible traceback output:
Command failed: "/usr/bin/python" "/home/yodatak/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
[DEPRECATION WARNING]: accelerate is kept for backwards compatibility but usage
is discouraged. The module documentation details page may explain more about
this rationale.. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: aos_asn_pool is kept for backwards compatibility but
usage is discouraged. The module documentation details page may explain more
about this rationale.. This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
[DEPRECATION WARNING]: aos_blueprint is kept for backwards compatibility but
usage is discouraged. The module documentation details page may explain more
about this rationale.. This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg

モジュールの引数補完を個別で実行可能にする

今は、

  • モジュール名 + 'a': 必須引数を展開
  • モジュール名 + 'o': オプション引数含めて展開

の2種類しか引数の展開方法がない。
直上のブロックを見て、モジュール名と一致した場合は該当モジュールの引数を補完で出せるようにしたい。

ただし、以下の2パターンに対応しないといけない点に注意。

- yum:
- action: yum
  args:

Getting `stdout maxBuffer length exceeded`

Hi,
I'm constantly getting

autocomplete-ansible traceback output:

stdout maxBuffer length exceeded

On a freshly installed atom on Ubuntu 18.04

Details:

✓ ~→ atom --version                                                                                         [15:27:19]
Atom    : 1.40.1
Electron: 3.1.10
Chrome  : 66.0.3359.181
Node    : 10.2.0

Installed packages:

✓ ~→ la ~/.atom/packages                                                                                    [15:28:16]
total 52K
drwxrwxr-x 13 sergio sergio 4.0K Oct 23 15:25 ./
drwxrwxr-x  9 sergio sergio 4.0K Oct 23 15:25 ../
drwxrwxr-x 10 sergio sergio 4.0K Oct 23 09:24 ansible-vault/
drwxrwxr-x  3 sergio sergio 4.0K Oct 23 10:04 atom-material-syntax/
drwxrwxr-x  7 sergio sergio 4.0K Oct 23 10:00 atom-material-ui/
drwxrwxr-x  8 sergio sergio 4.0K Oct 23 15:25 autocomplete-ansible/
drwxrwxr-x  7 sergio sergio 4.0K Oct 23 09:29 busy-signal/
drwxrwxr-x  8 sergio sergio 4.0K Oct 23 09:29 intentions/
drwxrwxr-x  6 sergio sergio 4.0K Oct 23 15:16 language-ansible/
drwxrwxr-x  6 sergio sergio 4.0K Oct 23 09:28 linter/
drwxrwxr-x  5 sergio sergio 4.0K Oct 23 09:30 linter-ansible-linting/
drwxrwxr-x  5 sergio sergio 4.0K Oct 23 09:48 linter-ansible-syntax/
drwxrwxr-x  8 sergio sergio 4.0K Oct 23 09:29 linter-ui-default/

Ansible 2.4 is not supported

Hi all!

What is required to support Ansible 2.4?

Using the current version 2.4.0, I get the following error:

Command failed: /usr/local/Cellar/ansible/2.4.0.0/libexec/bin/python2.7 "/Users/alex/.atom/packages/autocomplete-ansible/lib/parse_ansible.py"
Traceback (most recent call last):
  File "/Users/alex/.atom/packages/autocomplete-ansible/lib/parse_ansible.py", line 11, in <module>
    from ansible.plugins import lookup_loader, module_loader
ImportError: cannot import name lookup_loader

I think this is related to ansible 2.4, which seems to be unsupported, see the note on the front page of atom-autocomplkete-ansible:

Requirements:
ansible >= 2.0, < 2.4

So what steps are required to support current Ansible 2.4.x?

Thanks!
Alex

PS.: This is a duplicate of #18 – but I think the issue title is more accurate, therefore I created it anyways. Please feel free to close one or the other immediately. Thanks!

Sublime port?

Hello

It would be awesome if this plugin could be ported to Sublime Text Editor 3.

Thanks a million!

does not work on windows

Hello,

sure, wont fix... on windows, except when using wsl, it should be possilbe. I have ansible installed in my WSL.

if i run in cmd.exe:

C:\Windows\System32\wsl.exe -e python /mnt/c/Users/myusers/.atom/packages/autocomplete-ansible/libs/parse_ansible.py

i got the complete JSON-response. So i think i might be possible for the plugin to these information too on the same way. What can i do? Can i patch some files of you plugin.

Best regards
Oliver

Failed to load the autocomplete-ansible package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.22.1 x64
Electron: 1.6.15
OS: Unknown Windows version
Thrown From: autocomplete-ansible package 0.1.15

Stack Trace

Failed to load the autocomplete-ansible package

At Cannot find module 'fuzzaldrin'

Error: Cannot find module 'fuzzaldrin'
    at Module._resolveFilename (module.js:470:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.22.1/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.22.1/resources/app/src/module-cache.js:354:58)
    at Module.require (/app.asar/static/index.js:40:43)
    at require (~/AppData/Local/atom/app-1.22.1/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-autocomplete-ansible-0.1.15/lib/provider.js:4:30)
    at /packages/atom-autocomplete-ansible-0.1.15/lib/provider.js:187:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.22.1/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.22.1/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (~/AppData/Local/atom/app-1.22.1/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-autocomplete-ansible-0.1.15/lib/main.js:7:17)
    at /packages/atom-autocomplete-ansible-0.1.15/lib/main.js:42:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.22.1/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.22.1/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (~/AppData/Local/atom/app-1.22.1/resources/app/static/<embedded>:96:26)
    at Package.module.exports.Package.requireMainModule (~/AppData/Local/atom/app-1.22.1/resources/app/src/package.js:903:35)
    at ~/AppData/Local/atom/app-1.22.1/resources/app/src/package.js:158:34
    at Package.module.exports.Package.measure (~/AppData/Local/atom/app-1.22.1/resources/app/src/package.js:99:21)
    at Package.module.exports.Package.load (~/AppData/Local/atom/app-1.22.1/resources/app/src/package.js:144:18)
    at PackageManager.loadAvailablePackage (~/AppData/Local/atom/app-1.22.1/resources/app/src/package-manager.js:617:16)
    at config.transact (~/AppData/Local/atom/app-1.22.1/resources/app/src/package-manager.js:530:20)

Commands

Non-Core Packages

autocomplete-ansible 0.1.15 
fuzzaldrin 2.1.0 
language-ansible 0.2.1 
linter-ansible-linting 1.3.1 
linter-ansible-syntax 1.2.0 

Error with python 3 and Ansible 2.3.2.0, OSX

Maybe I've goofed up the environment, but I'm getting an error.
$ brew install python3
$ pip3 install ansible
$ ansible --version
ansible 2.3.2.0
config file =
configured module search path = Default w/o overrides
python version = 3.6.2 (default, Sep 16 2017, 12:26:10) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
$ head -1 /usr/local/bin/ansible
#!/usr/local/opt/python3/bin/python3.6

Putting that path into the plugin, I get a bunch of deprecation warnings and then errors about not being able to parse paths that do exist:
[ERROR]: unable to parse /usr/local/lib/python3.6/site-
packages/ansible/modules/files/acl.py
[ERROR]: unable to parse /usr/local/lib/python3.6/site-
packages/ansible/modules/system/beadm.py

stacktrace.txt

Ansible seems to work fine, so I don't think it's a permission error. Apologies if that's all it is :-)

Attached the full stacktrace as well

Doesn't work on Windows Platform

Hello,

It would be awesome if your package can build (and work) on Windows Platform.

The error is below :

Command failed: C:\Python27\python.exe C:\Users\thitho\.atom\packages\autocomplete-ansible\lib/parse_ansible.py
Traceback (most recent call last):
  File "C:\Users\thitho\.atom\packages\autocomplete-ansible\lib/parse_ansible.py", line 6, in <module>
    from ansible.cli.doc import DocCLI
  File "C:\Python27\lib\site-packages\ansible\cli\__init__.py", line 42, in <module>
    from ansible.utils.display import Display
  File "C:\Python27\lib\site-packages\ansible\utils\display.py", line 21, in <module>
    import fcntl
ImportError: No module named fcntl

Anyway, Thanks in advance.

Ansible 4.0.0: AttributeError: module 'ansible.utils.plugin_docs' has no attribute 'BLACKLIST'

Command failed: "/usr/local/Cellar/ansible/4.0.0/libexec/bin/python" "/Users/k0ste/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
Traceback (most recent call last):
  File "/Users/k0ste/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 20, in <module>
    BLACKLIST_MODULES = plugin_docs.BLACKLIST['MODULE']
AttributeError: module 'ansible.utils.plugin_docs' has no attribute 'BLACKLIST'

error immediately after installing

to recreate, install the latest Atom. Install this package. Click on any .yml file. Get the following error.

autocomplete-python traceback output:
Command failed: /usr/local/bin/python "/Users/foo/.atom/packages/autocomplete-ansible/lib/parse_ansible.py"
Traceback (most recent call last):
  File "/Users/foo/.atom/packages/autocomplete-ansible/lib/parse_ansible.py", line 12, in <module>
    from ansible.utils import module_docs
ImportError: cannot import name module_docs

Modules are not loaded.

Only Directive are shown on the dropdown menu to choose from, Module is currently missing in my case.

MacOS 10.12.4
Atom 1.16.0 x64

TypeError: on line 44, in parse_ansible.py after upgrading ansible

Hi guys,

love this package on atom, saves me so mucht time. But after upgrading I am running into this error. Any ideas whats up?

Command failed: "/.../.pyenv/shims/python" "/.../.atom/packages/autocomplete-ansible/libs/parse_ansible.py" Traceback (most recent call last): File "/.../.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 98, in <module> print(main()) File "/.../.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 56, in main for module in get_module_list(): File "/.../.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 44, in get_module_list founds = doc_cli.find_plugins(path, 'module') TypeError: find_plugins() missing 1 required positional argument: 'ptype'

Traceback when Atom config path contains spaces

Hi, I'm receiving the following error with autocomplete-ansible:

autocomplete-python traceback output:

Command failed: /usr/local/bin/python /Users/ryan/Library/Mobile Documents/com~apple~CloudDocs/Sync/AtomEditor/packages/autocomplete-ansible/lib/parse_ansible.py
/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/ryan/Library/Mobile': [Errno 2] No such file or directory

The /Users/ryan/Library/Mobile Documents/com~apple~CloudDocs/Sync/AtomEditor/ path is where my Atom configuration is stored, with a symlink pointing to it from ~/.atom, so that my configuration can be shared between multiple computers. The path in question here is the system location of the macOS "iCloud Drive", and can not be changed.

You can see that the "Mobile Documents" part of the path contains a space, which seems to be confusing autocomplete-ansible or maybe autocomplete+ itself?

Thanks!

Error on opening a file

I'm getting this error whenever I open a file, followed by the plugin not working:

Command failed: /usr/bin/python "/home/gustavo/.atom/packages/autocomplete-ansible/lib/parse_ansible.py"
Traceback (most recent call last):
  File "/home/gustavo/.atom/packages/autocomplete-ansible/lib/parse_ansible.py", line 11, in <module>
    from ansible.plugins import lookup_loader, module_loader
ImportError: cannot import name lookup_loader

Note that I'm using ansible 2.4-devel, running from source. If I revert back to 2.3 it works fine.

Thanks

option to reduce comments

I think it would be really nice to have an option to reduce comments to one line (or remove them if that is easier), most of the time I am just looking to see what options there are for that module and know by name what src and such means, but instead am looking to see does it use src or path. This would reduce how much I end up having to go through and delete out to clean up my playbooks.

Does not find ansible installed by brew on macOS

Despite having ansible installed and visible in my path, this plugin continues to insist I install ansible with pip.

Screen Shot 2021-01-27 at 1 13 39 PM

The details below prove that ansible is installed and up-to-date.

% which ansible
/usr/local/bin/ansible

% brew info ansible
ansible: stable 2.10.6 (bottled), HEAD
Automate deployment, configuration, and upgrading
https://www.ansible.com/
/usr/local/Cellar/ansible/2.10.6 (37,746 files, 357.0MB) *
  Poured from bottle on 2021-01-27 at 13:08:49
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/ansible.rb
License: GPL-3.0-or-later
==> Dependencies
Build: pkg-config ✔
Required: libyaml ✔, [email protected] ✔, [email protected] ✔
==> Options
--HEAD
	Install HEAD version

% which python
/usr/local/bin/python

% python --version
Python 3.9.1

The plugin should be more intelligent about discovering ansible.

autocomplete-ansible give error traceback, when ansible installed with pip

atom 1.41.0 x64

Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

When open Atom:
Command failed: "/usr/bin/python" "/home/al/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
Traceback (most recent call last):
File "/home/al/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 35, in
doc_cli = DocCLI([])
File "/home/al/.local/lib/python3.6/site-packages/ansible/cli/doc.py", line 58, in init
super(DocCLI, self).init(args)
File "/home/al/.local/lib/python3.6/site-packages/ansible/cli/init.py", line 67, in init
raise ValueError('A non-empty list for args is required')
ValueError: A non-empty list for args is required

After doc-cli installed via pip:

Command failed: "/usr/bin/python" "/home/al/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
Traceback (most recent call last):
File "/home/al/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 35, in
doc_cli = DocCLI([])
File "/home/al/.local/lib/python3.6/site-packages/ansible/cli/doc.py", line 58, in init
super(DocCLI, self).init(args)
File "/home/al/.local/lib/python3.6/site-packages/ansible/cli/init.py", line 67, in init
raise ValueError('A non-empty list for args is required')
ValueError: A non-empty list for args is required

ValueError: A non-empty list for args is required

OS: Fedora 31
Atom: 1.41.0
ansible --version
ansible 2.9.1
config file = None
configured module search path = ['/home/stefan41/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/stefan41/.local/lib/python3.7/site-packages/ansible
executable location = /home/stefan41/.local/bin/ansible
python version = 3.7.5 (default, Oct 17 2019, 12:16:48) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]

Following error occurs when starting Atom:

autocomplete-ansible traceback output:

Command failed: "/usr/bin/python" "/home/stefan41/.atom/packages/autocomplete-ansible/libs/parse_ansible.py"
Traceback (most recent call last):
  File "/home/stefan41/.atom/packages/autocomplete-ansible/libs/parse_ansible.py", line 35, in <module>
    doc_cli = DocCLI([])
  File "/home/stefan41/.local/lib/python3.7/site-packages/ansible/cli/doc.py", line 58, in __init__
    super(DocCLI, self).__init__(args)
  File "/home/stefan41/.local/lib/python3.7/site-packages/ansible/cli/__init__.py", line 67, in __init__
    raise ValueError('A non-empty list for args is required')
ValueError: A non-empty list for args is required

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.