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)
Summary: [abrt] pyp2rpm-1.0.1-2.fc19: package_data.py:56:changelog_date_packager:Unico...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pyp2rpm
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Kuska
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d873e5a0cee66a2e77ec7c34764...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-08 16:29 UTC by Miro Hrončok
Modified: 2016-04-18 10:16 UTC (History)
3 users (show)

Fixed In Version: pyp2rpm-1.1.0b-1.fc20
Clone Of:
Environment:
Last Closed: 2014-05-12 05:21:39 UTC
Type: ---
Embargoed:


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

Description Miro Hrončok 2013-07-08 16:29:13 UTC
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>'
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 16:29:16 UTC
Created attachment 770571 [details]
File: backtrace

Comment 2 Miro Hrončok 2013-07-08 16:29:19 UTC
Created attachment 770572 [details]
File: core_backtrace

Comment 3 Miro Hrončok 2013-07-08 16:29:23 UTC
Created attachment 770573 [details]
File: environ

Comment 4 Robert Kuska 2014-01-10 12:02:59 UTC
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 07:28:24 UTC
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 07:01:16 UTC
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 05:21:39 UTC
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.