jgilchrist / pybib

Get BibTeX citations from your terminal
BSD 3-Clause "New" or "Revised" License
26 stars 2 forks source link

UnicodeEncodeError with french é on names #3

Closed LuisBL closed 8 years ago

LuisBL commented 8 years ago

With the 2.2.1 version

(lab)luis@spinoza:/tmp$ bib --version
2.2.1

A search on this:

(lab)luis@spinoza:/tmp$ bib search From Local Patterns to Global Models: The LeGo Approach to Data Mining
0. From Local Patterns to Global Models: Towards Domain Driven Educational Process Mining
    N. Trcka, M. Pechenizkiy (2009) [Proceedings Article], 
    10.1109/isda.2009.159
1. From Local Patterns to Classification Models
    B. Bringmann, S. Nijssen, A. Zimmermann (2010) [Book Chapter], 
    10.1007/978-1-4419-7738-0_6
Traceback (most recent call last):
  File "/home/luis/lab/bin/bib", line 11, in <module>
    sys.exit(main())
  File "/home/luis/lab/local/lib/python2.7/site-packages/pybib/main.py", line 55, in main
    args.cmd(args)
  File "/home/luis/lab/local/lib/python2.7/site-packages/pybib/main.py", line 22, in search_cmd
    formatted_result = pybib.format_entry(result)
  File "/home/luis/lab/local/lib/python2.7/site-packages/pybib/formatters.py", line 161, in format_entry
    return template.format(parts=parts)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 14: ordinal not in range(128)
(lab)luis@spinoza:/tmp$
LuisBL commented 8 years ago

Ok this issue is with a

$ pip2 install pybib

There is no error with pip3 install

$ pip3 install pybib
jgilchrist commented 8 years ago

Sorry for taking so long to get back about this, I've been busy with University. Seeing as it's a Unicode (and therefore a Python 2) issue I will update the documentation to ensure installation under Python 3.

If there's anyone who isn't able to use it on Python 3 then I can change the program instead.