{"action":"created","issue":{"url":"https://api.github.com/repos/Diaoul/subliminal/issues/454","labels_url":"https://api.github.com/repos/Diaoul/subliminal/issues/454/labels{/name}","comments_url":"https://api.github.com/repos/Diaoul/subliminal/issues/454/comments","events_url":"https://api.github.com/repos/Diaoul/subliminal/issues/454/events","html_url":"https://github.com/Diaoul/subliminal/issues/454","id":88527633,"number":454,"title":"TypeError: 'float' object cannot be interpreted as an integer","user":{"login":"jorti","id":1035223,"avatar_url":"https://avatars.githubusercontent.com/u/1035223?v=3","gravatar_id":"","url":"https://api.github.com/users/jorti","html_url":"https://github.com/jorti","followers_url":"https://api.github.com/users/jorti/followers","following_url":"https://api.github.com/users/jorti/following{/other_user}","gists_url":"https://api.github.com/users/jorti/gists{/gist_id}","starred_url":"https://api.github.com/users/jorti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorti/subscriptions","organizations_url":"https://api.github.com/users/jorti/orgs","repos_url":"https://api.github.com/users/jorti/repos","events_url":"https://api.github.com/users/jorti/events{/privacy}","received_events_url":"https://api.github.com/users/jorti/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Diaoul/subliminal/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/Diaoul/subliminal/labels/status/fix-pending","name":"status/fix-pending","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-15T20:12:31Z","updated_at":"2015-07-17T01:16:42Z","closed_at":"2015-07-15T23:07:32Z","body":"I'm using subliminal as a library, and I hit this error when trying to download a subtitle:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"./extract-subs.py\", line 110, in <module>\r\n    main(sys.argv)\r\n  File \"./extract-subs.py\", line 106, in main\r\n    extract_subs(file_list)\r\n  File \"./extract-subs.py\", line 68, in extract_subs\r\n    download_subs(file)\r\n  File \"./extract-subs.py\", line 49, in download_subs\r\n    video = subliminal.scan_videos([file['full_path'], ], subtitles=False, embedded_subtitles=False)\r\n  File \"/usr/lib/python3.4/site-packages/subliminal/video.py\", line 320, in scan_videos\r\n    videos.append(scan_video(filepath, subtitles, embedded_subtitles))\r\n  File \"/usr/lib/python3.4/site-packages/subliminal/video.py\", line 224, in scan_video\r\n    video.hashes['opensubtitles'] = hash_opensubtitles(path)\r\n  File \"/usr/lib/python3.4/site-packages/subliminal/video.py\", line 386, in hash_opensubtitles\r\n    for _ in range(65536 / bytesize):\r\nTypeError: 'float' object cannot be interpreted as an integer\r\n```"},"comment":{"url":"https://api.github.com/repos/Diaoul/subliminal/issues/comments/122142368","html_url":"https://github.com/Diaoul/subliminal/issues/454#issuecomment-122142368","issue_url":"https://api.github.com/repos/Diaoul/subliminal/issues/454","id":122142368,"user":{"login":"kakai248","id":4193601,"avatar_url":"https://avatars.githubusercontent.com/u/4193601?v=3","gravatar_id":"","url":"https://api.github.com/users/kakai248","html_url":"https://github.com/kakai248","followers_url":"https://api.github.com/users/kakai248/followers","following_url":"https://api.github.com/users/kakai248/following{/other_user}","gists_url":"https://api.github.com/users/kakai248/gists{/gist_id}","starred_url":"https://api.github.com/users/kakai248/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kakai248/subscriptions","organizations_url":"https://api.github.com/users/kakai248/orgs","repos_url":"https://api.github.com/users/kakai248/repos","events_url":"https://api.github.com/users/kakai248/events{/privacy}","received_events_url":"https://api.github.com/users/kakai248/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T01:16:42Z","updated_at":"2015-07-17T01:16:42Z","body":"This error happens on python 3. Can be fixed by putting ```int(65536 / bytesize)``` on both line 386 and 392 of ```video.py```.\r\n\r\nAfter fixing this there is also an error on line 416:\r\n```\r\nAttributeError: 'str' object has no attribute 'decode'\r\n```\r\n\r\nCan be fixed by removing ```.decode('ascii')```. I tested and the hashes match after these changes for both situations."}}