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

filter_plugins.py invalid syntax #24

Open
sumagol opened this issue Aug 16, 2019 · 1 comment
Open

filter_plugins.py invalid syntax #24

sumagol opened this issue Aug 16, 2019 · 1 comment

Comments

@sumagol
Copy link

sumagol commented Aug 16, 2019

Ansible:
[WARNING]: Skipping plugin (/home/user/.ansible/roles/arista.eos-bridging/filter_plugins/range_filter.py) as it seems to be invalid: invalid syntax (range_filter.py, line 52)

have Python 3.7.4 running

Is:

for _, grp in groupby(enumerate(numlist), lambda (i, x): i-x):

should:

 for _, grp in groupby(enumerate(numlist), lambda i, x: i-x):

works like this for me :)

@rmcmilli
Copy link

Ansible:
[WARNING]: Skipping plugin (/home/user/.ansible/roles/arista.eos-bridging/filter_plugins/range_filter.py) as it seems to be invalid: invalid syntax (range_filter.py, line 52)

have Python 3.7.4 running

Is:

for _, grp in groupby(enumerate(numlist), lambda (i, x): i-x):

should:

 for _, grp in groupby(enumerate(numlist), lambda i, x: i-x):

works like this for me :)

This didn't work for me. I had to use
for _, grp in groupby(enumerate(numlist), lambda x: x[1]-x[0] ):

based on: https://stackoverflow.com/questions/35181413/using-a-tuple-as-a-parameter-of-lambda-throws-an-error-about-a-missing-required

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

2 participants