Bug 2216115 - [abrt] terminator: feed(): terminal.py:1697:feed:AttributeError: 'bytes' object has no attribute 'encode'
Summary: [abrt] terminator: feed(): terminal.py:1697:feed:AttributeError: 'bytes' obje...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: terminator
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dominic Hopf
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:b9b55f15b0cdae8c5f20268607e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-20 07:28 UTC by Gael
Modified: 2023-07-02 08:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (734 bytes, text/plain)
2023-06-20 07:28 UTC, Gael
no flags Details
File: environ (1.95 KB, text/plain)
2023-06-20 07:28 UTC, Gael
no flags Details
File: mountinfo (7.71 KB, text/plain)
2023-06-20 07:28 UTC, Gael
no flags Details
File: open_fds (2.47 KB, text/plain)
2023-06-20 07:28 UTC, Gael
no flags Details
File: namespaces (171 bytes, text/plain)
2023-06-20 07:28 UTC, Gael
no flags Details
File: backtrace (679 bytes, text/plain)
2023-06-20 07:28 UTC, Gael
no flags Details
File: cpuinfo (3.12 KB, text/plain)
2023-06-20 07:28 UTC, Gael
no flags Details

Description Gael 2023-06-20 07:28:09 UTC
Description of problem:
dropping url from Firefox into the terminator window

Version-Release number of selected component:
terminator-2.1.3-1.fc38

Additional info:
reporter:       libreport-2.17.10
kernel:         6.3.5-200.fc38.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/terminator
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-terminator-20970.scope
uid:            1000
reason:         terminal.py:1697:feed:AttributeError: 'bytes' object has no attribute 'encode'
executable:     /usr/bin/terminator
type:           Python3
package:        terminator-2.1.3-1.fc38
runlevel:       N 5
exception_type: AttributeError
crash_function: feed
interpreter:    python3-3.11.3-2.fc38.x86_64
comment:        dropping url from Firefox into the terminator window

Truncated backtrace:
terminal.py:1697:feed:AttributeError: 'bytes' object has no attribute 'encode'

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/terminatorlib/terminal.py", line 1264, in on_drag_data_received
    term.feed(txt.encode())
  File "/usr/lib/python3.11/site-packages/terminatorlib/terminal.py", line 1697, in feed
    self.vte.feed_child(text.encode())
                        ^^^^^^^^^^^
AttributeError: 'bytes' object has no attribute 'encode'

Local variables in innermost frame:
self: <terminal.Terminal object at 0x7fc19799ef00 (terminatorlib+terminal+Terminal at 0x556220177950)>
text: b'file:///home/gael/T%C3%A9l%C3%A9chargements/manifest(1).m3u8'

Potential duplicate: bug 2180891

Comment 1 Gael 2023-06-20 07:28:12 UTC
Created attachment 1971661 [details]
File: os_info

Comment 2 Gael 2023-06-20 07:28:13 UTC
Created attachment 1971662 [details]
File: environ

Comment 3 Gael 2023-06-20 07:28:15 UTC
Created attachment 1971663 [details]
File: mountinfo

Comment 4 Gael 2023-06-20 07:28:16 UTC
Created attachment 1971664 [details]
File: open_fds

Comment 5 Gael 2023-06-20 07:28:18 UTC
Created attachment 1971665 [details]
File: namespaces

Comment 6 Gael 2023-06-20 07:28:19 UTC
Created attachment 1971666 [details]
File: backtrace

Comment 7 Gael 2023-06-20 07:28:21 UTC
Created attachment 1971667 [details]
File: cpuinfo

Comment 8 Davide Repetto 2023-07-01 17:12:19 UTC
Crash happens while dragging an icon to the terminal.

Upstream is already fixed.


reporter:       libreport-2.17.10
kernel:         6.3.8-200.fc38.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/terminator --layout=ReD
cgroup:         0::/user.slice/user-1000.slice/session-2.scope
uid:            1000
reason:         terminal.py:1697:feed:AttributeError: 'bytes' object has no attribute 'encode'
executable:     /usr/bin/terminator
type:           Python3
package:        terminator-2.1.3-1.fc38
runlevel:       N 5
exception_type: AttributeError
crash_function: feed
interpreter:    python3-3.11.4-1.fc38.x86_64

Comment 9 Davide Repetto 2023-07-02 08:01:41 UTC
Crash happens while dragging an icon to the terminal.
Upstream is already fixed.

The following is a very quick workaround while waiting for the upstream mods to trickle in:

$ sudo sed -i 's/self.vte.feed_child(text.encode())/self.vte.feed_child(text)/' /usr/lib/python3.11/site-packages/terminatorlib/terminal.p


reporter:       libreport-2.17.11
kernel:         6.3.8-200.fc38.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/terminator --layout=ReD
cgroup:         0::/user.slice/user-1000.slice/session-2.scope
uid:            1000
reason:         terminal.py:1697:feed:AttributeError: 'bytes' object has no attribute 'encode'
executable:     /usr/bin/terminator
type:           Python3
package:        terminator-2.1.3-1.fc38
runlevel:       N 5
exception_type: AttributeError
crash_function: feed
interpreter:    python3-3.11.4-1.fc38.x86_64


Note You need to log in before you can comment on or make changes to this bug.