Bug 982321 - [abrt] pyp2rpm-1.0.1-2.fc19: package_data.py:56:changelog_date_packager:UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 9: ordinal not in range(128)
[abrt] pyp2rpm-1.0.1-2.fc19: package_data.py:56:changelog_date_packager:Unico...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: pyp2rpm (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Robert Kuska
Fedora Extras Quality Assurance
abrt_hash:d873e5a0cee66a2e77ec7c34764...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 12:29 EDT by Miro Hrončok
Modified: 2016-04-18 06:16 EDT (History)
3 users (show)

See Also:
Fixed In Version: pyp2rpm-1.1.0b-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-12 01:21:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.46 KB, text/plain)
2013-07-08 12:29 EDT, Miro Hrončok
no flags Details
File: core_backtrace (771 bytes, text/plain)
2013-07-08 12:29 EDT, Miro Hrončok
no flags Details
File: environ (3.39 KB, text/plain)
2013-07-08 12:29 EDT, Miro Hrončok
no flags Details

  None (edit)
Description Miro Hrončok 2013-07-08 12:29:13 EDT
Description of problem:
$ pyp2rpm -n dropbox

Version-Release number of selected component:
pyp2rpm-1.0.1-2.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python /usr/bin/pyp2rpm -n dropbox
dso_list:       python-jinja2-2.6-6.fc19.noarch
executable:     /usr/bin/pyp2rpm
kernel:         3.9.8-300.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
package_data.py:56:changelog_date_packager:UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 9: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/bin/pyp2rpm", line 9, in <module>
    load_entry_point('pyp2rpm==1.0.1', 'console_scripts', 'pyp2rpm')()
  File "/usr/lib/python2.7/site-packages/pyp2rpm/bin.py", line 75, in main
    converted = convertor.convert()
  File "/usr/lib/python2.7/site-packages/pyp2rpm/convertor.py", line 75, in convert
    return jinja_template.render(data = data, name_convertor = name_convertor)
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/site-packages/pyp2rpm/templates/fedora.spec", line 116, in top-level template code
    * {{ data.changelog_date_packager }} - {{ data.version }}-1
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 372, in getattr
    return getattr(obj, attribute)
  File "/usr/lib/python2.7/site-packages/pyp2rpm/package_data.py", line 56, in changelog_date_packager
    return '{0} {1}'.format(date_str, packager.decode(encoding))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 9: ordinal not in range(128)

Local variables in innermost frame:
packager: 'Miro Hron\xc4\x8dok <mhroncok@redhat.com>'
date_str: 'Mon Jul 08 2013'
self: <pyp2rpm.package_data.PypiData object at 0x1f4d650>
encoding: 'UTF-8'
Comment 1 Miro Hrončok 2013-07-08 12:29:16 EDT
Created attachment 770571 [details]
File: backtrace
Comment 2 Miro Hrončok 2013-07-08 12:29:19 EDT
Created attachment 770572 [details]
File: core_backtrace
Comment 3 Miro Hrončok 2013-07-08 12:29:23 EDT
Created attachment 770573 [details]
File: environ
Comment 4 Robert Kuska 2014-01-10 07:02:59 EST
I can confirm the issue. 

It is caused by passing unicode literals to str.

Pyp2rpm is in process of code refactoring so I will update this issue later when finished.
Comment 5 Fedora Update System 2014-04-30 03:28:24 EDT
pyp2rpm-1.1.0b-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/pyp2rpm-1.1.0b-1.fc20
Comment 6 Fedora Update System 2014-05-01 03:01:16 EDT
Package pyp2rpm-1.1.0b-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pyp2rpm-1.1.0b-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5835/pyp2rpm-1.1.0b-1.fc20
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2014-05-12 01:21:39 EDT
pyp2rpm-1.1.0b-1.fc20 has been pushed to the Fedora 20 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.