Strange behaviour looking up for metadata

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

enrico123
Junior
Posts: 34
Joined: Mon Sep 22, 2014 1:36 pm
Switzerland

Re: Strange behaviour looking up for metadata

Post by enrico123 » Tue Dec 15, 2020 9:22 pm

Hi Roland,

I could load many coverarts in the right language now, for movies and for series.

In one case I'm still having a problem:

Unforgettable - Tödliche Liebe tmdb3.py_418437

It's very strange:

The script executed inside mythfrontend doesn't work and also calling directly the script from the command line fails:

/usr/share/mythtv/metadata/Movie/tmdb3.py -l de -a CH -D 418437 --debug

But trying from the tmdb3_test directory that we created and used a few days ago

Code: Select all

mythbuntu@newmyth:~/tmdb3_test$ ls -l
total 612
-rw-rw-r-- 1 mythbuntu mythbuntu   1773 Dez  8 15:59 myth_tmdb_v1.patch
drwxr-xr-x 8 mythbuntu mythbuntu   4096 Dez  8 15:43 MythTV
-rw-rw-r-- 1 mythbuntu mythbuntu  94941 Dez  8 15:48 tmdb3_2020-12-08_original_241254_log.txt
-rw-rw-r-- 1 mythbuntu mythbuntu 187893 Dez  8 16:09 tmdb3_2020-12-08_patched_241254_log.txt
-rw-rw-r-- 1 mythbuntu mythbuntu  25693 Dez  8 16:38 tmdb3_2020-12-08_patched_241254_log.txt.zip
-rw-rw-r-- 1 mythbuntu mythbuntu  50030 Dez  8 16:26 tmdb3_2020-12-08_unpatched_13279_log.txt
-rw-rw-r-- 1 mythbuntu mythbuntu   8355 Dez  8 16:36 tmdb3_2020-12-08_unpatched_13279_log.txt.zip
-rw-rw-r-- 1 mythbuntu mythbuntu  98721 Dez  8 16:29 tmdb3_2020-12-08_unpatched_241254_log.txt
-rw-rw-r-- 1 mythbuntu mythbuntu  14935 Dez  8 16:37 tmdb3_2020-12-08_unpatched_241254_log.txt.zip
-rw-rw-r-- 1 mythbuntu mythbuntu  85516 Dez  8 16:22 tmdb3_2020-12-08_unpatched_68727_log.txt
-rw-rw-r-- 1 mythbuntu mythbuntu  12498 Dez  8 16:37 tmdb3_2020-12-08_unpatched_68727_log.txt.zip
-rwxr-xr-x 1 mythbuntu mythbuntu  13323 Dez  8 17:49 tmdb3.py
is successful:

mythbuntu@newmyth:~/tmdb3_test$ ./tmdb3.py -l de -a CH -D 418437 --debug

But trying inside the tmdb3_patch directory doesn't work:

Code: Select all

mythbuntu@newmyth:~/tmdb3_patch$ ls -l
total 184
-rw-rw-r-- 1 mythbuntu mythbuntu 49881 Dez  8 18:05 tmdb3_2020-12-08_13279_log.txt
-rw-rw-r-- 1 mythbuntu mythbuntu  8464 Dez  8 18:15 tmdb3_2020-12-08_13279_log.txt.zip
-rw-rw-r-- 1 mythbuntu mythbuntu 84585 Dez  8 18:02 tmdb3_2020-12-08_68727_log.txt
-rw-rw-r-- 1 mythbuntu mythbuntu 12633 Dez  8 18:15 tmdb3_2020-12-08_68727_log.txt.zip
-rw-rw-r-- 1 mythbuntu mythbuntu  3323 Dez  8 17:02 tmdb3_coverart.patch
-rwxr-xr-x 1 mythbuntu mythbuntu 14839 Dez  8 17:56 tmdb3.py
mythbuntu@newmyth:~/tmdb3_patch$ ./tmdb3.py -l de -a CH -D 418437 --debug

see the attachments.

Why this behavior ?

Many thanks for investigating!

Best regards,
Enrico
Attachments
unforgettable-failed-tmdb3_patch-log.txt
(3.7 KiB) Downloaded 4 times
unforgettable-successful-tmdb3_test-log.txt
(30.81 KiB) Downloaded 5 times
unforgettable-full-path-failed-log.txt
(3.82 KiB) Downloaded 4 times

enrico123
Junior
Posts: 34
Joined: Mon Sep 22, 2014 1:36 pm
Switzerland

Re: Strange behaviour looking up for metadata

Post by enrico123 » Wed Dec 16, 2020 3:35 pm

Strange!

Today the following command executes successfully and returns valid metadata!

/usr/share/mythtv/metadata/Movie/tmdb3.py -l de -a CH -D 418437 --debug

What can be the reason for such an instability?

User avatar
Steve Goodey
Moderator
Posts: 157
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Strange behaviour looking up for metadata

Post by Steve Goodey » Wed Dec 16, 2020 5:25 pm

PEBKAC? :D
Don't forget the Wiki.

User avatar
dnalorernst
Developer
Posts: 52
Joined: Mon Feb 17, 2020 8:03 pm
Austria

Re: Strange behaviour looking up for metadata

Post by dnalorernst » Wed Dec 16, 2020 5:32 pm

It could be a cache problem as well:
Once, an unsuccessful return of a request is cached, it stays there until the cached data expire.
Does your home router or ISP caching, too?

User avatar
dnalorernst
Developer
Posts: 52
Joined: Mon Feb 17, 2020 8:03 pm
Austria

Re: Strange behaviour looking up for metadata

Post by dnalorernst » Wed Dec 16, 2020 5:40 pm

And, be aware of the python import strategy:
If you have a "MythTV" folder under your current folder at the command prompt,
python chooses this folder instead of the installed MythTV bindings.
You should better delete these test folders or move them to an archive.
Everything is already installed, new issues should start from a clean setup.

enrico123
Junior
Posts: 34
Joined: Mon Sep 22, 2014 1:36 pm
Switzerland

Re: Strange behaviour looking up for metadata

Post by enrico123 » Wed Dec 16, 2020 9:32 pm

Thanks Roland!

My router is caching web requests. I'll try to delete the cache once that the problem occurs again.
And I'll delete both the tmdb3_test and the tmdb3_patch directory.
As you say, new issues should start from a clean setup.

Now everything seems to work as expected.

The only small problem is with my iPad App that I don't know from where it is getting the metadata and coverart.
According the description the app should get it from the backend, but maybe there is also in the iPad a sort of cache or there is another location in the backend filesystem or database tables where the old coverart is still stored. :)

mtrax
Junior
Posts: 42
Joined: Sat Aug 16, 2014 6:44 am
Australia

Re: Strange behaviour looking up for metadata

Post by mtrax » Tue Jan 05, 2021 6:09 am

just wondering if my issue with ttvdb.py is related to this thread
I'm getting the following error in my Ubuntu system

/usr/share/mythtv/metadata/Television/ttvdb.py -l en -a AU -C 74860

Code: Select all

Traceback (most recent call last):
  File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2710, in <module>
    sys.exit(main())
  File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2505, in main
    convert_series_to_xml(t, series_season_ep, None)
  File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2071, in convert_series_to_xml
    if 'poster' not in t.shows[show_id].data['_banners'].keys():
KeyError: '_banners'

User avatar
dnalorernst
Developer
Posts: 52
Joined: Mon Feb 17, 2020 8:03 pm
Austria

Re: Strange behaviour looking up for metadata

Post by dnalorernst » Wed Jan 06, 2021 2:24 pm

The traceback should be fixed by today's commit.
See https://github.com/MythTV/mythtv/issues/298

If thetvdb.com does not return any banners, we should ignore them.

However, the returned urls are still invalid and have been invalid for a long time:

Code: Select all

ttvdb.py -l en -a AU -C 74860

<images>
  <image type="coverart" url="http://thetvdb.com/banners/" thumb="http://thetvdb.com/banners/_cache/"/>
  <image type="fanart" url="http://thetvdb.com/banners/" thumb="http://thetvdb.com/banners/_cache/"/>
</images>
Therefore issue #298 is actually twofold:
- Traceback if there are no banneres available
- Incorrect urls returned for coverart and fanart

Roland

User avatar
dnalorernst
Developer
Posts: 52
Joined: Mon Feb 17, 2020 8:03 pm
Austria

Re: Strange behaviour looking up for metadata

Post by dnalorernst » Sun Jan 17, 2021 10:40 pm

@mtrax

Does the changes in mythtv v31.0-130-g016630a35c from Jan. 8th work for you?

Please add a response to the bug you opened at https://github.com/MythTV/mythtv/issues/298

Roland

Post Reply