Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode characters in folder/file names #8

Open
bewbs opened this issue Feb 24, 2015 · 1 comment
Open

Unicode characters in folder/file names #8

bewbs opened this issue Feb 24, 2015 · 1 comment

Comments

@bewbs
Copy link

bewbs commented Feb 24, 2015

I'm not able to pass a file/folder with unicode characters in the name to MacGuffin. :sadface:

user@host:~/rtorrent/download$ upload [Valid folder containing the character: ó]
auto_upload    : ERROR    An unexpected error occurred. Please report the following information to the developers:
Traceback (most recent call last):
  File "/home/user/macguffin/auto_upload.py", line 86, in <module>
    files.set_log_file_name(os.path.basename(path) + '.log')
  File "/home/user/macguffin/files/utils.py", line 169, in set_log_file_name
    disk_log_handler = logging.FileHandler(filename=log_path, mode='w', encoding='utf-8')
  File "/usr/lib/python2.7/logging/__init__.py", line 901, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 926, in _open
    stream = codecs.open(self.baseFilename, self.mode, self.encoding)
  File "/usr/lib/python2.7/codecs.py", line 881, in open
    file = __builtin__.open(filename, mode, buffering)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 34: ordinal not in range(128)
@thezoggy
Copy link

your issue is due to your badly setup env, aka your locale is not set correctly.
once you fix that (something that supports utf-8), you will be fine.

do locale from command line.. you will see its probably set to C or ascii.. hence the problem.
do locale -a to see what your options are on the box... then set it to the correct one via your shell/config.. something like en_US.utf-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants