fedora-python / pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.
MIT License
127 stars 39 forks source link

Traceback on EL7 #39

Closed xsuchy closed 8 years ago

xsuchy commented 8 years ago

During command bellow I got traceback on EL7 - when I run this on F23 it works without problem.

$ rpm -q pyp2rpm
pyp2rpm-2.0.0-3.noarch
$ pyp2rpm 02exercicio --srpm -d /tmp/tmpY1dkXw -b 2
INFO  Pyp2rpm initialized.
INFO  Using /tmp/tmpY1dkXw as directory to save source.
INFO  Downloaded package from PyPI: /tmp/tmpY1dkXw/02exercicio-1.0.0.tar.gz.
INFO  Getting metadata from PyPI.
INFO  Using default template: fedora.spec.
INFO  Using name: python-02exercicio.spec for specfile.
Traceback (most recent call last):
  File "/usr/bin/pyp2rpm", line 9, in <module>
    load_entry_point('pyp2rpm==2.0.0', 'console_scripts', 'pyp2rpm')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pyp2rpm/bin.py", line 118, in main
    f.write(converted)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 194-195: ordinal not in range(128)
hroncok commented 8 years ago

On F23 it works on Python 3. I guess that might be the cause.

mcyprian commented 8 years ago

This should be already fixed b8e244a343dab0f, the same issue has been reported before: #28.

xsuchy commented 8 years ago

Then lets close it.