{"action":"created","issue":{"url":"https://api.github.com/repos/SiCKRAGETV/sickrage-issues/issues/3703","labels_url":"https://api.github.com/repos/SiCKRAGETV/sickrage-issues/issues/3703/labels{/name}","comments_url":"https://api.github.com/repos/SiCKRAGETV/sickrage-issues/issues/3703/comments","events_url":"https://api.github.com/repos/SiCKRAGETV/sickrage-issues/issues/3703/events","html_url":"https://github.com/SiCKRAGETV/sickrage-issues/issues/3703","id":118118218,"number":3703,"title":"UnicodeEncodeError: 'ascii' codec can't encode character ordinal not in range (128)","user":{"login":"brando56894","id":572116,"avatar_url":"https://avatars.githubusercontent.com/u/572116?v=3","gravatar_id":"","url":"https://api.github.com/users/brando56894","html_url":"https://github.com/brando56894","followers_url":"https://api.github.com/users/brando56894/followers","following_url":"https://api.github.com/users/brando56894/following{/other_user}","gists_url":"https://api.github.com/users/brando56894/gists{/gist_id}","starred_url":"https://api.github.com/users/brando56894/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brando56894/subscriptions","organizations_url":"https://api.github.com/users/brando56894/orgs","repos_url":"https://api.github.com/users/brando56894/repos","events_url":"https://api.github.com/users/brando56894/events{/privacy}","received_events_url":"https://api.github.com/users/brando56894/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-20T20:16:32Z","updated_at":"2015-11-25T19:10:48Z","closed_at":null,"body":"Edit: While adding in my info I noticed that my SickRage locale is set to (None, None). How do I fix this?\r\n\r\nI know this is a long standing issue that can be resolved by setting your locale but this doesn't seem to be the case for me in FreeBSD. Python itself works fine with these characters, SickRage doesn't seem to like them though for some reason. What's going on here?\r\n\r\nI have all the variables set:\r\n\r\n[root@UsenetApps /usenet]# locale\r\nLANG=en_US.UTF-8\r\nLC_CTYPE=\"en_US.UTF-8\"\r\nLC_COLLATE=\"en_US.UTF-8\"\r\nLC_TIME=\"en_US.UTF-8\"\r\nLC_NUMERIC=\"en_US.UTF-8\"\r\nLC_MONETARY=\"en_US.UTF-8\"\r\nLC_MESSAGES=\"en_US.UTF-8\"\r\n\r\nAnd it clearly works in the python shell:\r\n\r\n[root@UsenetApps /usenet]$ python\r\n python 2.7.10 (default, Oct 20 2015, 17:24:44) \r\n[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import sys\r\n>>> sys.getdefaultencoding()\r\n'ascii'\r\n>>> print u\"\\xfa\"\r\nú\r\n>>> print u'\\u2019'\r\n’\r\n>>> print u\"\\u2019\"\r\n’\r\n>>> print u\"\\u2026\"\r\n…\r\n>>> print u\"\\u2014\"\r\n—\r\n\r\n\r\nYet it just crashes in SickRage:\r\n2015-11-19 07:24:57 Thread-13 :: Failed doing webui callback: Traceback (most recent call last):\r\n  File \"/usr/local/sickrage/sickbeard/webserve.py\", line 259, in async_call\r\n    result = function(**kwargs)\r\n  File \"/usr/local/sickrage/sickbeard/webserve.py\", line 2203, in processEpisode\r\n    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), type=type\r\n  File \"/usr/local/sickrage/sickbeard/processTV.py\", line 272, in processDir\r\n    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, result)\r\n  File \"/usr/local/sickrage/sickbeard/processTV.py\", line 554, in process_media\r\n    result.result = processor.process()\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 951, in process\r\n    self._delete(cur_ep.location, associated_files=True)\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 234, in _delete\r\n    file_list = file_list + self.list_associated_files(file_path, base_name_only=True, subfolders=True)\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 186, in list_associated_files\r\n    filelist = recursive_glob(ek(os.path.dirname, globbable_file_path), base_name + '*') # just create the list of all files starting with the basename\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 160, in recursive_glob\r\n    for base, _, files in os.walk(treeroot):\r\n  File \"/usr/local/lib/python2.7/os.py\", line 286, in walk\r\n    if isdir(join(top, name)):\r\n  File \"/usr/local/lib/python2.7/genericpath.py\", line 49, in isdir\r\n    st = os.stat(s)\r\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xe9' in position 47: ordinal not in range(128)\r\n\r\n2015-11-19 07:23:52 Thread-25 :: Failed doing webui callback: Traceback (most recent call last):\r\n  File \"/usr/local/sickrage/sickbeard/webserve.py\", line 259, in async_call\r\n    result = function(**kwargs)\r\n  File \"/usr/local/sickrage/sickbeard/webserve.py\", line 2203, in processEpisode\r\n    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), type=type\r\n  File \"/usr/local/sickrage/sickbeard/processTV.py\", line 272, in processDir\r\n    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, result)\r\n  File \"/usr/local/sickrage/sickbeard/processTV.py\", line 554, in process_media\r\n    result.result = processor.process()\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 951, in process\r\n    self._delete(cur_ep.location, associated_files=True)\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 234, in _delete\r\n    file_list = file_list + self.list_associated_files(file_path, base_name_only=True, subfolders=True)\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 186, in list_associated_files\r\n    filelist = recursive_glob(ek(os.path.dirname, globbable_file_path), base_name + '*') # just create the list of all files starting with the basename\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 160, in recursive_glob\r\n    for base, _, files in os.walk(treeroot):\r\n  File \"/usr/local/lib/python2.7/os.py\", line 286, in walk\r\n    if isdir(join(top, name)):\r\n  File \"/usr/local/lib/python2.7/genericpath.py\", line 49, in isdir\r\n    st = os.stat(s)\r\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xe9' in position 47: ordinal not in range(128)\r\n\r\n2015-11-19 07:21:27 Thread-52 :: Failed doing webui callback: Traceback (most recent call last):\r\n  File \"/usr/local/sickrage/sickbeard/webserve.py\", line 259, in async_call\r\n    result = function(**kwargs)\r\n  File \"/usr/local/sickrage/sickbeard/webserve.py\", line 2203, in processEpisode\r\n    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), type=type\r\n  File \"/usr/local/sickrage/sickbeard/processTV.py\", line 272, in processDir\r\n    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, result)\r\n  File \"/usr/local/sickrage/sickbeard/processTV.py\", line 554, in process_media\r\n    result.result = processor.process()\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 951, in process\r\n    self._delete(cur_ep.location, associated_files=True)\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 234, in _delete\r\n    file_list = file_list + self.list_associated_files(file_path, base_name_only=True, subfolders=True)\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 186, in list_associated_files\r\n    filelist = recursive_glob(ek(os.path.dirname, globbable_file_path), base_name + '*') # just create the list of all files starting with the basename\r\n  File \"/usr/local/sickrage/sickbeard/postProcessor.py\", line 160, in recursive_glob\r\n    for base, _, files in os.walk(treeroot):\r\n  File \"/usr/local/lib/python2.7/os.py\", line 286, in walk\r\n    if isdir(join(top, name)):\r\n  File \"/usr/local/lib/python2.7/genericpath.py\", line 49, in isdir\r\n    st = os.stat(s)\r\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\u2026' in position 81: ordinal not in range(128)\r\n\r\n\r\n\r\n\r\nSR Version: \tBRANCH: (master) / COMMIT: (c19526435dc15ba1bcd5827dd24d6a8e69c83e2b)\r\nSR User:\troot\r\nSR Locale:\t(None, None)\r\nSR Config:\t/usenet/sickrage/config.ini\r\nSR Database:\t/usenet/sickrage/sickbeard.db\r\nSR Cache Dir:\t/usenet/sickrage/cache\r\nSR Log Dir:\t/usenet/sickrage/logs\r\nSR Arguments:\t['--datadir', '/usenet/sickrage', '-d', '--pidfile', '/var/run/sickrage/sickrage.pid', '--quiet', '--nolaunch']\r\nPython Version:\t2.7.10 (default, Oct 20 2015, 17:24:44) [GCC 4.2.1 20070831 patched [FreeBSD]]\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/SiCKRAGETV/sickrage-issues/issues/comments/159703987","html_url":"https://github.com/SiCKRAGETV/sickrage-issues/issues/3703#issuecomment-159703987","issue_url":"https://api.github.com/repos/SiCKRAGETV/sickrage-issues/issues/3703","id":159703987,"user":{"login":"brando56894","id":572116,"avatar_url":"https://avatars.githubusercontent.com/u/572116?v=3","gravatar_id":"","url":"https://api.github.com/users/brando56894","html_url":"https://github.com/brando56894","followers_url":"https://api.github.com/users/brando56894/followers","following_url":"https://api.github.com/users/brando56894/following{/other_user}","gists_url":"https://api.github.com/users/brando56894/gists{/gist_id}","starred_url":"https://api.github.com/users/brando56894/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brando56894/subscriptions","organizations_url":"https://api.github.com/users/brando56894/orgs","repos_url":"https://api.github.com/users/brando56894/repos","events_url":"https://api.github.com/users/brando56894/events{/privacy}","received_events_url":"https://api.github.com/users/brando56894/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T19:10:48Z","updated_at":"2015-11-25T19:10:48Z","body":"Did it resolve just the (None, None) issue or the UnicodeDecode error? It doesn't want to work I try to switch branches and says to check the logs even though there aren't any errors in the logs, everything looks fine."}}