TabViewer / tabview

Python curses command line CSV and tabular data viewer
Other
460 stars 49 forks source link

Traceback when yanking cell with accent #125

Closed jahrome closed 9 years ago

jahrome commented 9 years ago

I get the following traceback when I yank a cell containing text with accents:

Traceback (most recent call last):
  File "./bin/tabview", line 109, in <module>
    delimiter=args.delimiter, quoting=args.quoting)
  File "./tabview/tabview.py", line 1316, in view
    info=info)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "./tabview/tabview.py", line 1237, in main
    Viewer(stdscr, *args, **kwargs).run()
  File "./tabview/tabview.py", line 701, in run
    self.handle_keys()
  File "./tabview/tabview.py", line 723, in handle_keys
    self.keys[c]()
  File "./tabview/tabview.py", line 631, in yank_cell
    universal_newlines=True).communicate(input=s)
  File "/usr/lib/python2.7/subprocess.py", line 785, in communicate
    self.stdin.write(input)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 18: ordinal not in range(128)
firecat53 commented 9 years ago

Good catch...it only happens with Python 2. Works with Python 3. I'll look into it, thanks!

Scott

firecat53 commented 9 years ago

Hopefully that fixes it for you! Test and let me know if there's any issues.

jahrome commented 9 years ago

Works smoothly, thanks !

On 07/20/2015 02:04 AM, Scott Hansen wrote:

Hopefully that fixes it for you! Test and let me know if there's any issues.

— Reply to this email directly or view it on GitHub https://github.com/firecat53/tabview/issues/125#issuecomment-122719841.