pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.8k stars 276 forks source link

[APP SUBMITTED]: unsupported operand type(s) for +: 'NoneType' and 'str' #287

Closed fernandog closed 8 years ago

fernandog commented 8 years ago

INFO

Python Version: 2.7.9 (default, Mar 1 2015, 13:48:22) [GCC 4.9.2] Operating System: Linux-4.4.6-3-osmc-armv7l-with-debian-8.4 Locale: UTF-8 Branch: logging_improvements Commit: PyMedusa/SickRage@9ea0d8f6b6836f345a1e76b6a9f35aed53b64861 No Log available with ERRORS:

ERROR

19:34:13 INFO::FINDSUBTITLES :: [9ea0d8f] Scanning video 'New.Girl.S05E13.1080p.WEB-DL.DD5.1.H.264-NTb.mkv' in '/media/SAMSUNG/media/series/New Girl/Season 5'
19:34:14 ERROR::FINDSUBTITLES :: [9ea0d8f] Failed to refine video
Traceback (most recent call last):
  File "/home/osmc/SickRage/lib/subliminal/core.py", line 543, in refine
    refiner_manager[refiner].plugin(video, **kwargs)
  File "/home/osmc/SickRage/sickbeard/refiners/release.py", line 50, in refine
    release_path = os.path.join(dirpath, release_name + fileext)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

STAFF NOTIFIED: @pymedusa/support @pymedusa/moderators

fernandog commented 8 years ago

@ratoaq2 new issue?

fernandog commented 8 years ago

@ratoaq2 its very weird that there is no release_name. I got 200 errors. Maybe some issue in code?

also why is scanning video if that file has all needed subs?

AATypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
AA    release_path = os.path.join(dirpath, release_name + fileext)
AA  File "/home/osmc/SickRage/sickbeard/refiners/release.py", line 50, in refine
AA    refiner_manager[refiner].plugin(video, **kwargs)
AA  File "/home/osmc/SickRage/lib/subliminal/core.py", line 543, in refine
AATraceback (most recent call last):
2016-04-07 03:27:44 ERROR    SHOWQUEUE-REFRESH :: [9ea0d8f] Failed to refine video
2016-04-07 03:27:44 INFO     SHOWQUEUE-REFRESH :: [9ea0d8f] Refining video with release
2016-04-07 03:27:44 INFO     SHOWQUEUE-REFRESH :: [9ea0d8f] Refining video with metadata
2016-04-07 03:27:43 INFO     SHOWQUEUE-REFRESH :: [9ea0d8f] Scanning video 'Marvels.Daredevil.S01E03.Rabbit.in.a.Snowstorm.1080p.NF.WEBRip.DD5.1.x264-NTb.mkv' in "/media/SAMSUNG/media/series/Marvel's Daredevil/Season 1"
ratoaq2 commented 8 years ago

Then the issue is the other side: fileext Can you debug or print those two vars in your env?

fernandog commented 8 years ago

@ratoaq2 See query result. No fileext in the release_name

only in column "location" we have fileext: /media/SAMSUNG/media/series/Marvel's Daredevil/Season 1/Marvels.Daredevil.S01E03.Rabbit.in.a.Snowstorm.1080p.NF.WEBRip.DD5.1.x264-NTb.mkv

image

ratoaq2 commented 8 years ago

The fileext comes from the video filename

Better to log the values for release_name and fileext and report them here

fernandog commented 8 years ago

@ratoaq2

https://gist.github.com/fernandog/147ef01fddc9a372cad1833dddc8d211

fernandog commented 8 years ago

@ratoaq2 problem is here:

https://github.com/pymedusa/SickRage/blob/develop/sickbeard/subtitles.py#L447

is calls get_video only with video_path: video = get_video(video_path)

so in get_video it considers release_name as empty: def get_video(video_path, subtitles_dir=None, subtitles=True, embedded_subtitles=None, release_name=None):

ratoaq2 commented 8 years ago

But that's on purpose. The refiner will return when there's no release_name