After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788676 - AttributeError: 'str' object has no attribute 'decode'
AttributeError: 'str' object has no attribute 'decode'
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Plugins (other)
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-08 16:31 UTC by gkrithi8
Modified: 2017-11-11 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
self.secret is expected to be a byte array rather than string for subsequent get() calls to work (889 bytes, patch)
2017-10-08 16:33 UTC, gkrithi8
none Details | Review
self.secret is expected to be a byte array rather than string for subsequent get() calls to work (1.02 KB, patch)
2017-10-14 19:28 UTC, gkrithi8
none Details | Review

Description gkrithi8 2017-10-08 16:31:25 UTC
Get the following trace in magnatune plugin, while clicking Magnatune preferences after editing Magnatune username / password.

Traceback (most recent call last):
  • File "/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/magnatune/magnatune.py", line 228 in do_create_configure_widget
    fill_account_details()
  • File "/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/magnatune/magnatune.py", line 174 in fill_account_details
    (account_type, username, password) = self.account.get()
  • File "/usr/lib/x86_64-linux-gnu/rhythmbox/plugins/magnatune/MagnatuneAccount.py", line 87 in get
    (username, password) = self.secret.decode("utf-8").split("\n")
AttributeError: 'str' object has no attribute 'decode'

Comment 1 gkrithi8 2017-10-08 16:33:20 UTC
Created attachment 361138 [details] [review]
self.secret is expected to be a byte array rather than string  for subsequent get() calls to work
Comment 2 gkrithi8 2017-10-14 19:28:28 UTC
Created attachment 361592 [details] [review]
self.secret is expected to be a byte array rather than string  for subsequent get() calls to work
Comment 3 Jonathan Matthew 2017-11-11 10:22:53 UTC
it seemed easier to convert the secret to a string after retrieving it from the secret store, so I did that instead.