Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completion fails with ValueError #19

Open
benatouba opened this issue Sep 24, 2021 · 9 comments
Open

completion fails with ValueError #19

benatouba opened this issue Sep 24, 2021 · 9 comments

Comments

@benatouba
Copy link

Hi,
thx for your work on the server. I really appreciate it.

I am using the server with neovim. Unfortunately the completion does not properly work. Most of the time the log has the following errors:

ValueError: too many values to unpack (expected 2)

salt-server.log

@dcermak
Copy link
Owner

dcermak commented Sep 27, 2021

Could you also upload the file that you were editing?

@benatouba
Copy link
Author

benatouba commented Sep 28, 2021

I made a simple top.sls file and post the log here. There are multiple errors in the log. I am not sure which one messes up the completions and which are acceptable.
salt-server.log

base:
  '*':
    - pkg.installed:

The salt version is 3003.2

@agraul
Copy link
Collaborator

agraul commented Nov 8, 2021

Hi @benatouba,

is the code block the whole top.sls file you have? As far as I know you need two files, the top.sls which contains a mapping of minions to SLS files and (at least) one SLS file itself.

For example:

# /srv/salt/top.sls
base:
  '*':                     # matches all minions
    - test                 # matches test.sls, assigned to all matched minions
# /srv/salt/test.sls
vim:
  pkg.installed

Do you get the same error with a SLS file setup like I described?

@agraul
Copy link
Collaborator

agraul commented Nov 8, 2021

I think both the ValueError: too many values to unpack (expected 2) and many of the yaml.scanner.ScannerError are fixed with #20

@dcermak
Copy link
Owner

dcermak commented Nov 9, 2021

@benatouba Could you recheck with the latest state from main?

@benatouba
Copy link
Author

As it looks to me right now, the updates solved this issue. I still get no completion but that might have a different source.

The log does only show "yaml.scan.errrors" with jinja templates (%). But that is not yet implemented, right?

@dcermak
Copy link
Owner

dcermak commented Nov 9, 2021 via email

@benatouba
Copy link
Author

Thx for the work so far. There still seem to be some problems with getting completion but I need to find out whether they might just be on my end.

@benatouba
Copy link
Author

Now I get completion for submodules, some time after I open the file. It seems to take some time. Here is the log file for the test.sls suggested by @agraul . As you can see there are no errors in the log. Maybe there is still helpful stuff for you in there.
salt-server.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants