Hellowlol / bw_plex

binge watching for plex
MIT License
366 stars 23 forks source link

ERROR :: plex.py:48 :: There was an exception in process_to_db #64

Closed PearsonFlyer closed 5 years ago

PearsonFlyer commented 5 years ago

New install on Windows 10, and things have been running well. Just got this error, though, and wanted to report it and make sure it wasn't anything to be concerned about.

2019-01-14 10:33:17,313 :: bw_plex :: DEBUG :: plex.py:657 :: Checking if we can reach The.Real.Housewives.of.Atlanta.s11e11 directly
2019-01-14 10:33:17,313 :: bw_plex :: WARNING :: plex.py:670 :: Downloading from pms..
2019-01-14 10:33:17,315 :: bw_plex :: DEBUG :: misc.py:260 :: Calling find_offset_ffmpeg with command ffmpeg -i http://192.168.1.54:32400/library/parts/706409/1547479942/file.mkv?download=1&X-Plex-Token=<hidden> -t 600 -vf blackdetect=d=0.5:pix_th=0.1 -af silencedetect=n=-50dB:d=0.3 -f null -
2019-01-14 10:33:33,279 :: bw_plex :: DEBUG :: misc.py:195 :: final_video [['00:00', '00:02', '00:02'], ['09:50', '09:52', '00:02']]
2019-01-14 10:33:33,279 :: bw_plex :: DEBUG :: misc.py:196 :: final_audio [['00:00', '00:01', '00:01'], ['00:06', '00:07', '00:00'], ['03:18', '03:19', '00:00'], ['09:49', '09:52', '00:02']]
2019-01-14 10:33:33,280 :: bw_plex :: DEBUG :: misc.py:198 :: fin v [[0.0, 2.002, 2.002], [590.006, 592.133, 2.127]]
2019-01-14 10:33:33,280 :: bw_plex :: DEBUG :: misc.py:199 :: fin a [[0.0, 1.94796, 1.94796], [6.29579, 7.21585, 0.920063], [198.887, 199.409, 0.522229], [589.922, 592.084, 2.16206]]
2019-01-14 10:33:33,280 :: bw_plex :: DEBUG :: misc.py:227 :: Matching windows are [['09:50', '09:52', '00:02']]
2019-01-14 10:33:33,282 :: bw_plex :: DEBUG :: misc.py:765 :: Checking if The.Real.Housewives.of.Atlanta.s11e11 has a recap with phrase previously on, last season, last episode using subtitles
2019-01-14 10:33:33,298 :: bw_plex :: DEBUG :: misc.py:704 :: Downloading subtitle from PMS
2019-01-14 10:33:34,398 :: bw_plex :: DEBUG :: plex.py:657 :: Checking if we can reach The.Real.Housewives.of.Atlanta.s11e11 directly
2019-01-14 10:33:34,400 :: bw_plex :: WARNING :: plex.py:670 :: Downloading from pms..
2019-01-14 10:33:34,400 :: bw_plex :: DEBUG :: credits.py:312 :: Trying to find the credits for http://192.168.1.54:32400/library/parts/706409/1547479942/file.mkv?download=1&X-Plex-Token=<hidden>
2019-01-14 10:33:34,838 :: bw_plex :: ERROR :: plex.py:48 :: There was an exception in process_to_db
Traceback (most recent call last):
  File "c:\bwplex\src\bw-plex\bw_plex\plex.py", line 43, in inner
    return func(*args)
  File "c:\bwplex\src\bw-plex\bw_plex\plex.py", line 137, in process_to_db
    check=-1)
  File "c:\bwplex\src\bw-plex\bw_plex\credits.py", line 324, in find_credits
    recs = locate_text(frame, debug=False)
  File "c:\bwplex\src\bw-plex\bw_plex\credits.py", line 244, in locate_text
    rect = cv2.boundingRect(contour)
error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\imgproc\src\shapedescr.cpp:741: error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S) in function 'cv::pointSetBoundingRect'`
Hellowlol commented 5 years ago

Thanks for the report. I have no idea what caused this error or how to fix it, but ill look into it. Did this only happen one time or has it happened several times?

PearsonFlyer commented 5 years ago

I'm getting a couple of others, but that one happened just one time. I'm getting this one as well. Just to be sure I didn't screw anything up, I blew out my install directory, and re-did pip install bw_plex[all].

2019-01-14 12:16:46,713 :: bw_plex :: ERROR :: plex.py:54 :: There was an exception in task
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\bw_plex\plex.py", line 50, in inner
    return func(*args)
  File "c:\python27\lib\site-packages\bw_plex\plex.py", line 788, in task
    process_to_db(media, vid=vid)
  File "c:\python27\lib\site-packages\bw_plex\plex.py", line 48, in inner
    return func(*args, **kwargs)
  File "c:\python27\lib\site-packages\bw_plex\plex.py", line 143, in process_to_db
    check=-1)
  File "c:\python27\lib\site-packages\bw_plex\credits.py", line 320, in find_credits
    recs = locate_text(frame, debug=False)
  File "c:\python27\lib\site-packages\bw_plex\credits.py", line 240, in locate_text
    rect = cv2.boundingRect(contour)
error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\imgproc\src\shapedescr.cpp:741: error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S) in function 'cv::pointSetBoundingRect'

And my config file looks like this;

[general] thread_pool_number = 10 debug = False level = debug mode = skip_only_theme ignore_intro_ratingkeys = , ignore_outro_ratingkeys = ,

this is used add to the progress we we can start skip faster.

no_wait_tick = 0

Clients and users are a whitelist! empty allows all.

clients = , users = [my user, so I'm not skipping for my other users]

[server] url = http://192.168.1.54:32400 token = [token removed] verify_ssl = False name = DellHTPC username =[my user] password = [my pass] [tv] check_credits = True check_credits_action = skip check_credits_start_next_ep = True check_credits_sec = 120 check_for_theme_sec = 600 check_intro_ffmpeg_sec = 600 process_recently_added = False process_deleted = False theme_source = all words = previously on, last season, last episode create_edl = False edl_action_type = 3

This will be ignored for now.

[movie] check_credits = True check_credits_action = skip check_credits_sec = 600 check_intro_ffmpeg_sec = 600 process_recently_added = False process_deleted = False create_edl = False edl_action_type = 3

ignore_intro_ratingkeys = list(default=list())

ignore_outro_ratingkeys = list(default=list())

Hellowlol commented 5 years ago

Awesome, thanks. In the future exceptions this this should not mess up the entire ep processing but just the credits part.

Hellowlol commented 5 years ago

Fixed.