Bug 2211745

Summary: [abrt] libreport-plugin-bugzilla: b64encode(): base64.py:58:b64encode:TypeError: a bytes-like object is required, not 'str'
Product: [Fedora] Fedora Reporter: Aleksandr <forgest94>
Component: libreportAssignee: abrt <abrt-devel-list>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: abrt-devel-list, abrt-sig, forgest94, mgrabovs, michal.toman, msrb
Target Milestone: ---Flags: msrb: needinfo? (forgest94)
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/ca76d86b117f79d4b9dea796df379abb8534ca5
Whiteboard: abrt_hash:5fe449334bc2936b1eb4a07993c2f92277806baa;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: os_info
none
File: environ
none
File: mountinfo
none
File: open_fds
none
File: namespaces
none
File: backtrace
none
File: cpuinfo none

Description Aleksandr 2023-06-01 18:49:20 UTC
Version-Release number of selected component:
libreport-plugin-bugzilla-2.17.10-1.fc38

Additional info:
reporter:       libreport-2.17.10
kernel:         6.2.15-300.fc38.x86_64
cmdline:        /usr/bin/python3 /usr/bin/reporter-bugzilla -b -c /etc/libreport/plugins/bugzilla.conf -F /etc/libreport/plugins/bugzilla_format.conf -A /etc/libreport/plugins/bugzilla_formatdup.conf
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/dbus-:1.2-org.freedesktop.problems.applet
uid:            1000
reason:         base64.py:58:b64encode:TypeError: a bytes-like object is required, not 'str'
executable:     /usr/bin/reporter-bugzilla
type:           Python3
package:        libreport-plugin-bugzilla-2.17.10-1.fc38
runlevel:       N 5
exception_type: TypeError
crash_function: b64encode
interpreter:    python3-3.11.3-2.fc38.x86_64

Truncated backtrace:
base64.py:58:b64encode:TypeError: a bytes-like object is required, not 'str'

Traceback (most recent call last):
  File "/usr/bin/reporter-bugzilla", line 799, in <module>
    response = bz_conn.attachment_create_from_problem_data(new_id, attachment, problem_data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/reportclient/internal/bz_connection.py", line 145, in attachment_create_from_problem_data
    file_content = base64.b64encode(pd_item['content']).decode('utf-8')
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/base64.py", line 58, in b64encode
    encoded = binascii.b2a_base64(s, newline=False)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: a bytes-like object is required, not 'str'

Local variables in innermost frame:
s: '/var/spool/abrt/ccpp-2023-05-30-23:05:23.521169-29233/backtrace'
altchars: None

Comment 1 Aleksandr 2023-06-01 18:49:25 UTC
Created attachment 1968381 [details]
File: os_info

Comment 2 Aleksandr 2023-06-01 18:49:27 UTC
Created attachment 1968382 [details]
File: environ

Comment 3 Aleksandr 2023-06-01 18:49:30 UTC
Created attachment 1968383 [details]
File: mountinfo

Comment 4 Aleksandr 2023-06-01 18:49:32 UTC
Created attachment 1968384 [details]
File: open_fds

Comment 5 Aleksandr 2023-06-01 18:49:34 UTC
Created attachment 1968385 [details]
File: namespaces

Comment 6 Aleksandr 2023-06-01 18:49:36 UTC
Created attachment 1968386 [details]
File: backtrace

Comment 7 Aleksandr 2023-06-01 18:49:38 UTC
Created attachment 1968387 [details]
File: cpuinfo

Comment 8 Michal Srb 2023-07-01 03:26:18 UTC
Thanks for the bug report. Would you happen to have that "/var/spool/abrt/ccpp-2023-05-30-23:05:23.521169-29233/backtrace" file still on your laptop please?
If so, would it be possible to upload it here? Thanks!