Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1489605

Summary: [abrt] fpaste: default(): encoder.py:180:default:TypeError: Object of type 'bytes' is not JSON serializable
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: fpasteAssignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: athmanem, kevin, lef, robyduck, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/a573c4b29968044b913f889d1257f6dd1a0f46f2
Whiteboard: abrt_hash:feee08aee076340ad9cc27b6e598d47599ce8e0d;
Fixed In Version: fpaste-0.3.9.1-1.fc26 fpaste-0.3.9.1-1.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-11 04:21:07 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: cpuinfo
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description Miro Hrončok 2017-09-07 21:13:41 UTC
Description of problem:
I've run:

  fpaste -i

with text in my clipboard.

Version-Release number of selected component:
fpaste-0.3.9.0-1.fc26

Additional info:
reporter:       libreport-2.9.1
cmdline:        python3 /usr/bin/fpaste -i
crash_function: default
exception_type: TypeError
executable:     /usr/bin/fpaste
kernel:         4.12.5-300.fc26.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
encoder.py:180:default:TypeError: Object of type 'bytes' is not JSON serializable

Traceback (most recent call last):
  File "/usr/bin/fpaste", line 763, in <module>
    main()
  File "/usr/bin/fpaste", line 720, in main
    url = paste(text, options)
  File "/usr/bin/fpaste", line 99, in paste
    'password': options.password}).encode('utf8')
  File "/usr/lib64/python3.6/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'bytes' is not JSON serializable

Local variables in innermost frame:
o: b'Name:           clamav-data-nightly\nSummary:        Virus signature data for the Clam Antivirus scanner nightly update\nVersion:        %(date +%Y.%m.%d)\nRelease:        1%{?dist}\nLicense:        GPLv2\nURL:            http://www.clamav.net\nBuildArch:      noarch\n\n# empty file to make it work (not sure if better way)\nSource0:        dummy\n\n%global homedir %{_var}/lib/clamav\n\nBuildRequires:  /usr/bin/freshclam\n\nRequires:  clamav-filesystem\nProvides:  data(clamav) = full\n\nProvides:  clamav-data\nConflicts: clamav-data\n\n\n%description\nNightly updated clamav data. Just a demo realy so far.\n\n\n%prep\n%setup -q -c -T %{name}-%{version}\n\n\n%build\nfreshclam --datadir=. --show-progress\n\n\n%install\nmkdir -p %{buildroot}%{homedir}\ncp -p *.cvd %{buildroot}%{homedir}\n\n\n%files\n%config %verify(not size md5 mtime) %{homedir}/*.cvd\n\n\n%changelog\n'
self: <json.encoder.JSONEncoder object at 0x7f3114f9f4e0>

Comment 1 Miro Hrončok 2017-09-07 21:13:48 UTC
Created attachment 1323468 [details]
File: backtrace

Comment 2 Miro Hrončok 2017-09-07 21:13:49 UTC
Created attachment 1323469 [details]
File: cgroup

Comment 3 Miro Hrončok 2017-09-07 21:13:51 UTC
Created attachment 1323470 [details]
File: cpuinfo

Comment 4 Miro Hrončok 2017-09-07 21:13:52 UTC
Created attachment 1323471 [details]
File: environ

Comment 5 Miro Hrončok 2017-09-07 21:13:54 UTC
Created attachment 1323472 [details]
File: mountinfo

Comment 6 Miro Hrončok 2017-09-07 21:13:55 UTC
Created attachment 1323473 [details]
File: namespaces

Comment 7 Miro Hrončok 2017-09-07 21:13:57 UTC
Created attachment 1323474 [details]
File: open_fds

Comment 8 Ankur Sinha (FranciscoD) 2017-09-07 23:30:49 UTC
Seeing this too. I'll look into it over the weekend. Thank you for the bug report.

Comment 9 Fedora Update System 2017-09-08 21:52:29 UTC
fpaste-0.3.9.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cdc4de7f0b

Comment 10 Fedora Update System 2017-09-08 21:52:39 UTC
fpaste-0.3.9.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5dfa8f2420

Comment 11 Fedora Update System 2017-09-09 19:57:31 UTC
fpaste-0.3.9.1-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-cdc4de7f0b

Comment 12 Fedora Update System 2017-09-10 05:54:10 UTC
fpaste-0.3.9.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5dfa8f2420

Comment 13 Fedora Update System 2017-09-11 04:21:07 UTC
fpaste-0.3.9.1-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2017-09-30 06:21:32 UTC
fpaste-0.3.9.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.