Bazarr: DataTables warning: table id=search_result - Ajax error. For more information about this error, please see http://datatables.net/tn/7

Created on 22 Oct 2018  路  16Comments  路  Source: morpheus65535/bazarr

Describe the bug
Manual search for Brazilian Languages is showing this error: "DataTables warning: table id=search_result - Ajax error. For more information about this error, please see http://datatables.net/tn/7"

To Reproduce
Steps to reproduce the behavior:

  1. Go to Serie
  2. Click on button for manual search
  3. See error

Software (please complete the following information):

  • Bazarr: 0.6.6.3
  • Sonarr: 2.0.0.5252
  • OS: Docker
investigating

All 16 comments

It work without any problem on my side. Do you have something in the logs?

Hi,

The error don't occurs all the time, only with some subtitle result.

Traceback (most recent call last):
File "/Users/tadeucruz/Developer/Python/bazarr/libs/bottle.py", line 862, in _handle
return route.call(*args)
File "/Users/tadeucruz/Developer/Python/bazarr/libs/bottle.py", line 1740, in wrapper
rv = callback(
a, *ka)
File "/Users/tadeucruz/Developer/Python/bazarr/bazarr.py", line 140, in wrapper
return func(
a, **ka)
File "/Users/tadeucruz/Developer/Python/bazarr/bazarr.py", line 1510, in manual_search_json
data = manual_search(episodePath, language, hi, providers_list, providers_auth, sceneName, 'series')
File "/Users/tadeucruz/Developer/Python/bazarr/get_subtitle.py", line 210, in manual_search
subtitles_list.append(dict(score=round((compute_score(s, video, hearing_impaired=hi) / max_score * 100), 2), language=alpha2_from_alpha3(s.language.alpha3), hearing_impaired=str(s.hearing_impaired), provider=s.provider_name, subtitle=codecs.encode(pickle.dumps(s), "base64").decode(), url=s.page_link, matches=list(matched), dont_matches=list(not_matched)))
File "/Users/tadeucruz/Developer/Python/virtual27/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle BytesIO objects

I'm attaching a photo of var "s" whit is occurring the error
screen shot 2018-10-22 at 18 01 13

In the docker version this same error occurs.

Thanks.

Is it always with LegendasTV?

Yes, but not for all results.

I've done some changes to the scoring system in dev branch. Would you be able to give it a try? Thanks!

Hi,

I tried but the problem still exists.
I was debugging and e found when s.archive.content != None the errors occurs.
LegendasTV uses RAR (rarfile.RarFile) or ZIP (zipfile.ZipFile) for subtitles and the look likes pickle.dumps(s) doesn't work with this king of Object.

Some time I don't have problems because on the https://github.com/morpheus65535/bazarr/blob/05fb7088f847eebc9f1fb085038a5910cfb73cc1/libs/subliminal/providers/legendastv.py#L453 check if the subtitles is in the cache and don't try download the file and set a value None to s.archive.content

Thanks.

You want to be the first member of the official Bazarr testing team? :-)

I've never had someone giving me that level of useful informations when opening an issue! Thanks a lot.

I'll look at it tomorrow, but, I can say that we are working on an issue where download_subtitles() return no content sometime. I haven't been able to pin point the root cause for now but your test give me more input.

I'll come back to you as soon as I have something to test about this issue. Thanks again.

Hi,

Good to know that I helped with the problem. When you fix this problem I can test this case.

About testing team I can't at the moment but thanks 馃槂

Thanks!!

Do you still have this issue with 0.6.7?

Hi,

Yes.

I was looking into and I think one idea is to put this code before the serialization of the object

s.archive.content = None

Because when you call the

download_subtitles([subtitle], providers=provider, provider_configs=providers_auth)

The code in legendas.tv look if the subtitle.archive.content is None and redownload the file.

https://github.com/morpheus65535/bazarr/blob/da505bf087daa9e25c9cbb13273e586da2be8867/libs/subliminal/providers/legendastv.py#L510

Need to check with other providers does in this part of code.

Would you like to add it and submit a PR? Or at least confirm if it fix your issue? It would be greatly appreciated as I do not use legendastv. :-/

Yes,

I'll work in PR this weekend.

Thanks.

This issue has always been there with the legendastv provider. It'll be fixed when subliminal_patch is integrated.

Legendas tries to cache the archive stream data inside dogpile, which fails.

BTW I've merged your PR to dev branch. Could you give it a try? Thanks!

Hi, sorry for the delay.

I tested and everything looks fine.

Thanks.

I'm going to merge it to master in next version. Thanks!

Was this page helpful?
0 / 5 - 0 ratings