Page 1 of 1

IMDb Download failed

Posted: Wed Dec 12, 2018 22:32
by Paul_oz53
Our perennial nemesis is yet again failing.
  1. Go to guide
  2. Select a well known program e.g. Castle
  3. Press RED (IMDb search)
  4. List of matching entries appears.
  5. Select any item in the list
Re-query dialog returns:
IMDb Download failed: could not convert string to float: Error: please try again.

Re: IMDb Download failed

Posted: Thu Dec 13, 2018 00:17
by Star6key
I used it half a dozen times tonight from the epg (all movies), worked fine every time.
Just tried a few tv series (ncis, touched by an angel, friends) all worked fine.

T4 - Sydney.

Re: IMDb Download failed

Posted: Thu Dec 13, 2018 04:13
by Paul_oz53
Star6key wrote:
Thu Dec 13, 2018 00:17
I used it half a dozen times tonight from the epg (all movies), worked fine every time.
Just tried a few tv series (ncis, touched by an angel, friends) all worked fine.

T4 - Sydney.

Definitely not working on the T3, T4 & U4 all on 17.5.20181104 (17.5-800-g3d9a605) FW. Same error on each.

Re: IMDb Download failed

Posted: Thu Dec 13, 2018 09:32
by Grumpy_Geoff
Log shows -

Code: Select all

{746}<   387.438> ('[IMDB] ', 'IMDb Download failed: could not convert string to float: \xc2\xa0|\xc2\xa0')
[20181104]

Re: IMDb Download failed

Posted: Thu Dec 13, 2018 09:44
by Star6key
Paul_oz53 wrote:
Thu Dec 13, 2018 04:13
Star6key wrote:
Thu Dec 13, 2018 00:17
I used it half a dozen times tonight from the epg (all movies), worked fine every time.
Just tried a few tv series (ncis, touched by an angel, friends) all worked fine.

T4 - Sydney.

Definitely not working on the T3, T4 & U4 all on 17.5.20181104 (17.5-800-g3d9a605) FW. Same error on each.
Maybe a fw issue as I'm still using 17.5.20180826

Re: IMDb Download failed

Posted: Thu Dec 13, 2018 11:07
by Paul_oz53
Star6key wrote:
Thu Dec 13, 2018 09:44
Paul_oz53 wrote:
Thu Dec 13, 2018 04:13
Star6key wrote:
Thu Dec 13, 2018 00:17
I used it half a dozen times tonight from the epg (all movies), worked fine every time.
Just tried a few tv series (ncis, touched by an angel, friends) all worked fine.

T4 - Sydney.

Definitely not working on the T3, T4 & U4 all on 17.5.20181104 (17.5-800-g3d9a605) FW. Same error on each.
Maybe a fw issue as I'm still using 17.5.20180826

Yep, I agree - something in the later betas must have changed. I believe it was working when I first updated but can't be sure.

IMDb is not high on my radar of things to check. I use it at sporadic intervals when the other half asks "where do we know that face from?"

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 00:16
by MrQuade
Had it been explicitly pointed out that this only seems to be affecting series? The lookups seen to be working fine for movies.

The string to float error seems to be failing on a set of two numbers? Choking on season and episode data?

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 00:43
by Paul_oz53
MrQuade wrote:
Fri Dec 14, 2018 00:16
Had it been explicitly pointed out that this only seems to be affecting series? The lookups seen to be working fine for movies.

The string to float error seems to be failing on a set of two numbers? Choking on season and episode data?

Interesting observation MrQuade so I experimented with movies to screen on 7flix. Turns out from 1992 on it works ok with movies but fails with movies dated prior to 1970 (nothing listed for dates between the 1970 and 1992).

This could explain my earlier comment that I thought it had been working recently - I was almost certainly looking up recent movies at the time but more recently looked up TV series.

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 01:03
by MrQuade
And 1970 is significant in that it is the start of the Unix time epoch.

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 05:44
by prl
Star6key wrote:
Thu Dec 13, 2018 09:44
Paul_oz53 wrote:
Thu Dec 13, 2018 04:13
Definitely not working on the T3, T4 & U4 all on 17.5.20181104 (17.5-800-g3d9a605) FW. Same error on each.
Maybe a fw issue as I'm still using 17.5.20180826

It would be useful if you updated your signature block, which says "T4 - fw 17.5.20180417". For me, IMDb search does a successful download and fails to display any results in 20180417 on the examples I tried (NCIS, Castle). Which is what I'd expect.

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 05:57
by prl
MrQuade wrote:
Fri Dec 14, 2018 00:16
The string to float error seems to be failing on a set of two numbers? Choking on season and episode data?
The only place that the IMDb plugin code calls float() is to calculate the rating stars display. It doesn't try to do anything but extract text and display it for episode information.

Also, could people be more specific when reporting what works (and especially) what doesn't. "I used it half a dozen times tonight from the epg (all movies)" isn't all that useful. "Just tried a few tv series (ncis, touched by an angel, friends)" is far more useful. I'm not trying to pick on Star6key with that, his post was just a good example that shows both. There are quite a few posts that say little more than "it works/doesn't work on unspecified stuff".

Anyway, I can replicate Paul_oz53's original problem with a search on Castle: I also get "IMDb Download failed: could not convert string to float: Error: please try again." when I try to get the Details page for Castle (first entry in the returned list of title matches).

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 06:56
by prl
I've found a fix for Castle in firmware 20181104. I just tried a couple of movies post 1970 in the unaltered 20181104: Full Metal Jacket (1987), Star Trek V: The Final Frontier (1987), and while everything seemed to display correctly, no-one seems to have noticed an effect that I'm sure the directors would be happy with:
Screen Shot 2018-12-14 at 07.21.35.png
Screen Shot 2018-12-14 at 07.21.35.png (32.45 KiB) Viewed 2707 times
There doesn't seem to be a clean distinction between older movies that fail to display and newer ones that don't. The Passionate Strangers (1966) displayed, but with "no user rating yet", which is on a code path that avoids the bug. Pocket Full of Miracles (1961) failed with the float conversion problem.

The problem appears to be that IMDb's page generation has changed the formatting of the user rating from

Code: Select all

<div class="ratingValue">
<strong title="7.3 based on 5,207 user ratings"><span>7.3</span>
to

Code: Select all

<div class="ratingValue">
<strong title="7.3 based on 5,207 user ratings"><span itemprop="ratingValue">7.3</span>
The code that was searching for a match for <span>ratingvalue</span> was failing to match, and finding the next piece of text that matched <span>anything</span>, then using the value inside the span as the rating. In many cases that caused a floating point conversion exception.

The inflated user ratings that were sometimes shown were the result of the span matching the value in this (for Full Metal Jacket's 76 / 10):

Code: Select all

<div class="metacriticScore score_favorable titleReviewBarSubItem">
<span>76</span>
It's most likely the presence of a MetaCritic score (out of 100?) that saves some more recent movies and allows other (mostly earlier?) movies to fail. It doesn't appear to be the Unix Epoch that;s the cause.

The fix for Castle also fixes the inflated ratings for Full Metal Jacket and Star Trek V: The Final Frontier, and allows Pocket Full of Miracles to display correctly without a floating point conversion problem.

tl;dr: IMDb broke the IMDB plugin's screen-scraping (again). Patch the screen scraper and move along.

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 07:21
by prl

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 11:04
by prl
Some older movies, e.g Hitchcock's The Birds (1963) have MetaCritic ratings and the IMDB plugin shows them with an inflated User Rating rather than failing to display the Details page. The Birds scores 87/10. So definitely not the Unix Epoch (1/1/1970).

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 11:08
by prl
Fix submitted to the enigma2-plugins repository.

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 12:53
by Paul_oz53
prl wrote:
Fri Dec 14, 2018 11:08
Fix submitted to the enigma2-plugins repository.

Thanks as always Peter. Wish they would stop tinkering with it!

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 13:39
by prl
It's probably more changes in their content management system that create incidental changes in the HTML.

Re: IMDb Download failed

Posted: Fri Dec 14, 2018 13:41
by prl
The fix has been merged into the enigma2-plugins repository and should be in the next release.

Re: IMDb Download failed

Posted: Sun Feb 17, 2019 15:35
by Pete123
The fix has been merged into the enigma2-plugins repository and should be in the next release.
Hi, I’m on 20190207 firmware (online updated) and the above IMDB issues are still present for me.

Do you know if the fix was included in these latest firmware updates?

Thanks

Re: IMDb Download failed

Posted: Mon Feb 18, 2019 15:31
by prl
I did an IMDB search on Cold Case on a U4 running 20190207, and I got the error "IMDb Download: could not convert string to float: Error please try again.

That is the error that was originally reported in this topic.

Is that the error you got? If not, what is the full error message that you see?

I checked the compiled code for the IMDb plugin on the same U4 running 20190207 and it does not have the fix to the "could not convert string to float" bug.

Peteru may be able to clarify.

Re: IMDb Download failed

Posted: Mon Feb 18, 2019 15:47
by Pete123
I did an IMDB search on Cold Case on a U4 running 20190207, and I got the error "IMDb Download: could not convert string to float: Error please try again.

That is the error that was originally reported in this topic.

Is that the error you got? If not, what is the full error message that you see?
Yes, that’s the error I get. Also, the inflated user rating.

Interestingly, these issues do not appear on our other T4 running 20180910 firmware.

Re: IMDb Download failed

Posted: Mon Feb 18, 2019 17:13
by prl
Pete123 wrote:
Mon Feb 18, 2019 15:47
Interestingly, these issues do not appear on our other T4 running 20180910 firmware.

Strange. The master branch in the IMDb source repository hasn't changed since my fix.

Re: IMDb Download failed

Posted: Fri Mar 08, 2019 17:22
by Pete123
I think this fix may have been missed or forgotten.

Is it too late to have this included in the firmware that's about to be made official?

Re: IMDb Download failed

Posted: Fri Mar 08, 2019 17:26
by MrQuade
Pete123 wrote:
Fri Mar 08, 2019 17:22
I think this fix may have been missed or forgotten.

Is it too late to have this included in the firmware that's about to be made official?
I'm not sure what happened to the fix, but it is too late to make the offical release, as that has already happened.
Nothing a small online update can't resolve though. (once the mystery of the missing fix is solved)

Re: IMDb Download failed

Posted: Fri Mar 08, 2019 17:37
by prl
I just have to say again that the version of the IMDb plugin in the T4 firmware 20190207 does not have my most recent change in it.

The relevant regular expression should be '<div class="ratingValue">.*?<span itemprop="ratingValue">(?P<rating>.*?)</span>'
the actual expression in the T4 code is: '<div class="ratingValue">.*?<span>(?P<rating>.*?)</span>'

Re: IMDb Download failed

Posted: Sat Apr 06, 2019 19:01
by Star6key
When doing an imdb search from the epg on the T4 (in this case a title called 'The Overnight' on sbs 2 tonight in Sydney), it gives a list of titles with the year e.g. 'The Overnight (2015)'.
Doing the same search on the U4 gives the same list, but the year is missing. This means there are a number of titles called 'The Overnight', with no way of differentiating them.

Re: IMDb Download failed

Posted: Tue Apr 09, 2019 19:29
by Star6key
Bueller? Bueller? Bueller?

Re: IMDb Download failed

Posted: Wed Apr 10, 2019 01:38
by Star6key
Star6key wrote:
Sat Apr 06, 2019 19:01
When doing an imdb search from the epg on the T4 (in this case a title called 'The Overnight' on sbs 2 tonight in Sydney), it gives a list of titles with the year e.g. 'The Overnight (2015)'.
Doing the same search on the U4 gives the same list, but the year is missing. This means there are a number of titles called 'The Overnight', with no way of differentiating them.
I can't be the only one who sees this. Doing the search on the T4 displays the year in the results. Doing the search on the U4 does not display the year in the results. Seems to me there is a bug in the U4.

Re: IMDb Download failed

Posted: Wed Apr 10, 2019 10:11
by prl
Star6key wrote:
Wed Apr 10, 2019 01:38
Star6key wrote:
Sat Apr 06, 2019 19:01
When doing an imdb search from the epg on the T4 (in this case a title called 'The Overnight' on sbs 2 tonight in Sydney), it gives a list of titles with the year e.g. 'The Overnight (2015)'.
Doing the same search on the U4 gives the same list, but the year is missing. This means there are a number of titles called 'The Overnight', with no way of differentiating them.
I can't be the only one who sees this. Doing the search on the T4 displays the year in the results. Doing the search on the U4 does not display the year in the results. Seems to me there is a bug in the U4.

I just tried a search for "the overnight" on my test U4. If the plugin setting MENU>Setup>Show full movie or series name in title menu is disable, there are no dates in the title menu. If it is enabled, there are dates. Are you sure that the setting is enabled on your U4?

Tested on U4 firmware 20190207.

Re: IMDb Download failed

Posted: Wed Apr 10, 2019 10:13
by prl
Star6key wrote:
Tue Apr 09, 2019 19:29
Bueller? Bueller? Bueller?

Most of the people who wold normally answer questions like this are pretty busy on pre-release testing for the V2. In any case there doesn't seem to be a bug.

Re: IMDb Download failed

Posted: Wed Apr 10, 2019 18:34
by Star6key
prl wrote:
Wed Apr 10, 2019 10:11
...
I just tried a search for "the overnight" on my test U4. If the plugin setting MENU>Setup>Show full movie or series name in title menu is disable, there are no dates in the title menu. If it is enabled, there are dates. Are you sure that the setting is enabled on your U4?
...
I didn't even know it was a thing. It was turned off by default. :?
Thanks.

Re: IMDb Download failed

Posted: Wed Apr 10, 2019 19:10
by prl
The default is the behaviour before my improvements (a while ago now).