-
Notifications
You must be signed in to change notification settings - Fork 6
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
ValueError: too many values to unpack (expected 2) when using SlackPostCurl PostProcessor #7
Comments
What happens if you change the command from:
To, without the "" around webhook_url:
|
Changing the quoting made no difference. |
🤔 Can you add the channel key to the command - even if you're not overriding it.
|
Same error, but it did not post to Slack (no 'testing' channel)
|
Can you post the command you used and I'll look into it further. |
I am posting directly to myself and not a channel. I've used that webhook_url with AutoPkgr and your original Slacker post processor (which still works). |
Thanks - I'll have a look into this. I'll have a proper dig, probs something simple that I've missed. |
I went in to Slack settings and changed my webhook URL from a deprecated Custom Integration I set up in 2018 to one generated by the more recent Slack App method. That also made no difference. |
I've updated the postprocessor and it should resolve your issue 🤞 |
I think that's closer, but I'm still getting an error. This time, it appears the error is for every recipe that doesn't have an update, so doesn't post to slack:
From a AutoPkg list of 61 recipes, 2 had updates and I received the error 59 times. That includes MakeCatalogs.munki recipe that runs at the end, and will never result in a download. Attached are AutoPkg results of two consecutive runs, the first finds updates for the two recipes and posts to Slack without error, then the next run has no updates and errors out twice. |
🤬 My bad - I'll dig into it in the morning- Sorry 🙏 |
Should be working now - sorry for all the pain 🙏 |
That ran error free on my AutoPkg test server. I changed my production server to use SlackPostCurl instead of Slacker so I'll see what happens on its next scheduled run. |
The full recipe list on my production server ran via autopkg-conductor.sh using SlackPostCurl as the post processor, and worked as expected! Thank you so much for the bug fix. I appreciate all your effort. :) |
Pleased to hear it's working :) |
I'm trying out the new SlackPostCurl PostProcessor, and so far it is working but reports an error for each successful Slack post.
Both AutoPkg 2.7 (with Python 3.10) and AutoPkg 2.4.1 (with Python 3.7) have this error. I'm using the PostProcessor as is, with no edits.
To test, I ran an AutoPkg recipe from Terminal (my slack webhook is redacted):
$ autopkg run -vvv Skype.munki --post="com.github.notverypc.autopkg-recipes.postprocessors/SlackPostCurl" --key "webhook_url"="https://hooks.slack.com/services/123456789/123456789/123456789"
A Skype update was available, so it was downloaded and added to my repo. I received a Slack post:
In Terminal at the end of the AutoPkg run was this error:
Despite the error, Skype was added to the repo.
I also use autopkg-conductor.sh set up with SlackPostCurl for timed runs, which does error collecting to post to Slack at the end of a recipe list run. The same error gets reported to Slack like this:
Full AutoPkg run results attached:
AutoPkg-2.4.1-run.txt
AutoPkg-2.7-run.txt
The text was updated successfully, but these errors were encountered: