-
Notifications
You must be signed in to change notification settings - Fork 198
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
SparkleUpdateInfoProvider crashes with "AttributeError: 'str' object has no attribute 'decode'" #920
Comments
I'm not able to reproduce this on macOS 14.2 with 3.0RC2:
@workflowsguy What version of the included Python do you have?
|
I have tested this on two different Macs, with maOS 10.13.6 and 13.6.3. Both have AutoPkg 3.0RC2, and both give
On both machines execution of the recipe fails. I deduct from this SO answer that the 'decode' part of the statement
is not necessary because the string is already UTF8-encoded. |
I also can't reproduce this, on two different devices. The error is that it
is trying to decode information from the Sparkle feed's description, and
what it is getting back is not a string (which is probably something we
could fix to force cast it as a string). I would verify if the value you
are getting from the sparkle feed matches what you expect, or if there is
some kind of proxy in the way that is returning unexpected values.
…On Mon, Dec 18, 2023 at 12:26 AM workflowsguy ***@***.***> wrote:
I have tested this on two different Macs, with maOS 10.13.6 and 13.6.3.
Both have AutoPkg 3.0RC2, and both give
❯ /usr/local/autopkg/python --version
Python 3.10.4
On both machines execution of the recipe fails.
—
Reply to this email directly, view it on GitHub
<#920 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJFTX3XDJQZCEYI4KFWOXLYJ742FAVCNFSM6AAAAABAVEDTMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZG43DENJZG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
--
Nick McSpadden
***@***.***
|
So my tests show this:
Thus, when the line is changed to
the recipe executes correctly. As to why the recipe fails on our machines but not on yours, this might be caused by the fact that I am actually running an override of the original recipe. It seems that a change I have made in the override triggers this issue. Can you please verify this? |
So my tests show this:
Thus, when the line is changed to
the recipe executes correctly. As to why the recipe fails on our machines but not on yours, this was caused by the fact that I am actually running an override of the original recipe.
entry that triggered this issue. Can you please verify the |
Given that two of us can't reproduce the problem, and no one else has
mentioned or filed an issue on this, this doesn't sound like a code change
is warranted. I understand the issue, but it seems to be unique to your
setup.
Does this problem exist if you create a new override?
Can you post the override that you are using now so we can test the exact
same thing you are using?
…On Tue, Dec 19, 2023 at 1:56 AM workflowsguy ***@***.***> wrote:
So my tests show this:
SparkleUpdateInfoProvider.py on line 301 has the statement
pkginfo["description"] = description.decode("UTF-8")
description is of type str. Since Python 3, the str class no longer has a
decode method, the string data is already utf-8-encoded. So the
.decode("UTF-8") part of the line will cause an error. Maybe this line
was overlooked in a code update?
Thus, when the line is changed to
pkginfo["description"] = description
the recipe executes correctly.
As to why the recipe fails on our machines but not on yours, this was
caused by the fact that I am actually running an override of the original
recipe.
It contained an unnecessary
</dict>
<key>pkginfo_keys_to_copy_from_sparkle_feed</key>
<array>
<string>description</string>
</array>
entry that triggered this issue.
Can you please verify the decode problem?
—
Reply to this email directly, view it on GitHub
<#920 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJFTX3P7MOVDQMYIEXI22TYKFQFJAVCNFSM6AAAAABAVEDTMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSGQ2TCMRXGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
--
Nick McSpadden
***@***.***
|
Here is an override to the original recipe that only adds the key that crashes |
I can confirm that dropping the |
I don't know how and why this part got into the actual override in the first place. I only discovered that it was there while investigating the exception it triggered. As you correctly observed, it does not have any purpose in the override. |
Describe the problem
When running the recipe
com.github.autopkg.hjuutilainen-recipes/CodeRunner/CodeRunner2.munki.recipe
,SparkleUpdateInfoProvider
crashes autopkg.AutoPkg output
Expected behavior
Recipe should download the new app release successfully. In case of an error in the XML file,
autopkg
should exit gracefully, pointing out the issue that it encounterd.Version (please complete the following information):
The text was updated successfully, but these errors were encountered: