{"action":"opened","issue":{"url":"https://api.github.com/repos/Diaoul/subliminal/issues/653","repository_url":"https://api.github.com/repos/Diaoul/subliminal","labels_url":"https://api.github.com/repos/Diaoul/subliminal/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/Diaoul/subliminal/issues/653/comments","events_url":"https://api.github.com/repos/Diaoul/subliminal/issues/653/events","html_url":"https://github.com/Diaoul/subliminal/issues/653","id":150932292,"number":653,"title":"Windows Python 2.7 path error","user":{"login":"labrys","id":1867464,"avatar_url":"https://avatars.githubusercontent.com/u/1867464?v=3","gravatar_id":"","url":"https://api.github.com/users/labrys","html_url":"https://github.com/labrys","followers_url":"https://api.github.com/users/labrys/followers","following_url":"https://api.github.com/users/labrys/following{/other_user}","gists_url":"https://api.github.com/users/labrys/gists{/gist_id}","starred_url":"https://api.github.com/users/labrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labrys/subscriptions","organizations_url":"https://api.github.com/users/labrys/orgs","repos_url":"https://api.github.com/users/labrys/repos","events_url":"https://api.github.com/users/labrys/events{/privacy}","received_events_url":"https://api.github.com/users/labrys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-25T17:32:37Z","updated_at":"2016-04-25T17:32:37Z","closed_at":null,"body":"##### Summary:\r\nUsing python 2.7 and Subliminal 2.0rc1 on Windows causes either a path error if passed a non-unicode path or a Unicode error if passed unicode.\r\n\r\n##### Minimum steps to reproduce:\r\nUse the library code from https://github.com/Diaoul/subliminal, enable logging, and change the `'/video/folder'` to a path containing a unicode character such as `ō`.\r\n```python\r\nTraceback (most recent call last):\r\n  File \"C:/src/indexer/testsubs.py\", line 17, in <module>\r\n    videos = [v for v in scan_videos('G:\\\\Shōws') if v.age < timedelta(weeks=2)]\r\n  File \"build\\bdist.win-amd64\\egg\\subliminal\\core.py\", line 458, in scan_videos\r\nValueError: Path does not exist\r\n```\r\nWith unicode path:\r\n```python\r\nDEBUG:rebulk.rules:Checking rule condition: <TitleFromPosition>\r\nTraceback (most recent call last):\r\n  File \"C:\\Python27x64\\lib\\logging\\__init__.py\", line 853, in emit\r\n    msg = self.format(record)\r\n  File \"C:\\Python27x64\\lib\\logging\\__init__.py\", line 726, in format\r\n    return fmt.format(record)\r\n  File \"C:\\Python27x64\\lib\\logging\\__init__.py\", line 465, in format\r\n    record.message = record.getMessage()\r\n  File \"C:\\Python27x64\\lib\\logging\\__init__.py\", line 329, in getMessage\r\n    msg = msg % self.args\r\n  File \"C:\\Python27x64\\lib\\site-packages\\rebulk\\match.py\", line 781, in __repr__\r\n    return \"<%s:%s%s%s%s%s>\" % (self.value, self.span, flags, name, tags, defined)\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 5: ordinal not in range(128)\r\n```\r\n\r\nThis works just fine using Python 3."}}