Bug 1686473 - rhpkg module-build-local fails with AttributeError: 'str' object has no attribute 'decode'
Summary: rhpkg module-build-local fails with AttributeError: 'str' object has no attri...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: module-build-service
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Matt Prahl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-07 14:17 UTC by Matus Honek
Modified: 2019-03-31 03:11 UTC (History)
5 users (show)

Fixed In Version: module-build-service-2.18.1-1.fc29 module-build-service-2.18.1-1.fc30 module-build-service-2.18.1-1.fc28
Clone Of:
Environment:
Last Closed: 2019-03-23 02:57:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matus Honek 2019-03-07 14:17:57 UTC
Description of problem:
Building module locally throws exception (see Actual results).

Version-Release number of selected component (if applicable):
module-build-service-2.14.0-2.fc29.noarch

How reproducible:
always

Steps to Reproduce:
1. rhpkg module-build-local
2.
3.

Actual results:
2019-03-07 14:44:36,613 - MainThread - urllib3.util.retry - DEBUG - Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
2019-03-07 14:44:36,808 - MainThread - moksha.hub - WARNING - Cannot find qpid python module. Make sure you have python-qpid installed.
Traceback (most recent call last):
  File "/usr/bin/mbs-manager", line 11, in <module>
    load_entry_point('module-build-service==2.14.0', 'console_scripts', 'mbs-manager')()
  File "/usr/lib/python3.7/site-packages/module_build_service/manage.py", line 238, in manager_wrapper
    manager.run()
  File "/usr/lib/python3.7/site-packages/flask_script/__init__.py", line 417, in run
    result = self.handle(argv[0], argv[1:])
  File "/usr/lib/python3.7/site-packages/flask_script/__init__.py", line 386, in handle
    res = handle(*args, **config)
  File "/usr/lib/python3.7/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/module_build_service/manage.py", line 154, in build_module_locally
    username, handle, str(stream), skiptests, optional_params)
  File "/usr/lib/python3.7/site-packages/module_build_service/utils/submit.py", line 400, in submit_module_build_from_yaml
    yaml_file = handle.read().decode("utf-8")
AttributeError: 'str' object has no attribute 'decode'
Could not execute module_build_local: Failed to execute command.


Expected results:
Building works, no tracebacks.

Additional info:
Downgrading to module-build-service-2.12.2-1.fc29.noarch makes this work again.

Comment 1 Matt Prahl 2019-03-18 15:44:50 UTC
This should fix this specific exception:
https://pagure.io/fm-orchestrator/pull-request/1172

Comment 2 Owen Taylor 2019-03-18 19:00:16 UTC
A backport of the fix into the current F29/F30 packages would be really appreciated!

Comment 3 Fedora Update System 2019-03-20 20:24:10 UTC
module-build-service-2.18.1-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7271b9fe81

Comment 4 Fedora Update System 2019-03-20 20:24:19 UTC
module-build-service-2.18.1-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e5bc7a4bcb

Comment 5 Fedora Update System 2019-03-20 20:24:33 UTC
module-build-service-2.18.1-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2b7c399008

Comment 6 Fedora Update System 2019-03-21 19:12:17 UTC
module-build-service-2.18.1-1.fc30 has been pushed to the Fedora 30 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-2019-2b7c399008

Comment 7 Fedora Update System 2019-03-21 21:18:53 UTC
module-build-service-2.18.1-1.fc29 has been pushed to the Fedora 29 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-2019-e5bc7a4bcb

Comment 8 Fedora Update System 2019-03-21 21:48:53 UTC
module-build-service-2.18.1-1.fc28 has been pushed to the Fedora 28 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-2019-7271b9fe81

Comment 9 Fedora Update System 2019-03-23 02:57:15 UTC
module-build-service-2.18.1-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2019-03-29 19:18:41 UTC
module-build-service-2.18.1-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2019-03-31 03:11:18 UTC
module-build-service-2.18.1-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


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