Bug 1440246

Summary: [abrt] rpmlint: b2s(): Pkg.py:48:b2s:AttributeError: 'str' object has no attribute 'decode'
Product: [Fedora] Fedora Reporter: Jared Smith <jsmith.fedora>
Component: rpmlintAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: j, kevin, tcallawa, tmz, twoerner, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/078ae97657af38fc74528e41a8ab5257adf0b42b
Whiteboard: abrt_hash:91352554a052cd0c572228096d7214270a5ca301;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-07 17:01:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description Jared Smith 2017-04-07 16:26:09 UTC
Description of problem:
Trying to run rpmlint on an SRPM or RPM package throws this error.

Version-Release number of selected component:
rpmlint-1.9-8.fc27

Additional info:
reporter:       libreport-2.9.1
cmdline:        /usr/bin/python3 -ttOu /usr/bin/rpmlint /home/jsmith/Build/RPMS/x86_64/mraa-1.5.1-3.fc27.x86_64.rpm /home/jsmith/Build/RPMS/x86_64/python3-iio-1.5.1-3.fc27.x86_64.rpm
crash_function: b2s
exception_type: AttributeError
executable:     /usr/bin/rpmlint
kernel:         4.11.0-0.rc2.git1.1.fc27.x86_64
runlevel:       N 5
type:           Python3
uid:            1975

Truncated backtrace:
Pkg.py:48:b2s:AttributeError: 'str' object has no attribute 'decode'

Traceback (most recent call last):
  File "/usr/bin/rpmlint", line 371, in <module>
    main()
  File "/usr/bin/rpmlint", line 160, in main
    runChecks(pkg)
  File "/usr/bin/rpmlint", line 217, in runChecks
    check.check(pkg)
  File "/usr/share/rpmlint/AbstractCheck.py", line 50, in check
    return self.check_binary(pkg)
  File "/usr/share/rpmlint/DistributionCheck.py", line 40, in check_binary
    for fname in pkg.files():
  File "/usr/share/rpmlint/Pkg.py", line 611, in files
    self._gatherFilesInfo()
  File "/usr/share/rpmlint/Pkg.py", line 721, in _gatherFilesInfo
    pkgfile.magic = b2s(_magic.descriptor(fd))
  File "/usr/share/rpmlint/Pkg.py", line 48, in b2s
    return b.decode(errors='replace')
AttributeError: 'str' object has no attribute 'decode'

Local variables in innermost frame:
b: 'data'

Comment 1 Jared Smith 2017-04-07 16:26:17 UTC
Created attachment 1269817 [details]
File: backtrace

Comment 2 Jared Smith 2017-04-07 16:26:18 UTC
Created attachment 1269818 [details]
File: cgroup

Comment 3 Jared Smith 2017-04-07 16:26:19 UTC
Created attachment 1269819 [details]
File: environ

Comment 4 Jared Smith 2017-04-07 16:26:21 UTC
Created attachment 1269820 [details]
File: mountinfo

Comment 5 Jared Smith 2017-04-07 16:26:22 UTC
Created attachment 1269821 [details]
File: namespaces

Comment 6 Jared Smith 2017-04-07 16:26:23 UTC
Created attachment 1269822 [details]
File: open_fds

Comment 7 Ville Skyttä 2017-04-07 17:01:56 UTC

*** This bug has been marked as a duplicate of bug 1439941 ***