Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python exception when selecting title (ValueError: could not convert string to float: None) #45

Open
Miwer opened this issue Apr 22, 2019 · 9 comments
Labels
WonderfulSubs Issue related to site

Comments

@Miwer
Copy link

Miwer commented Apr 22, 2019

Hi,

Some titles are having problems in the plugin, even though I can play them fine in a browser.
Here's an example:

2019-04-22 01:05:37.037 T:3490497392   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                         - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                        Error Type: <type 'exceptions.ValueError'>
                                        Error Contents: could not convert string to float: None
                                        Traceback (most recent call last):
                                          File "/storage/.kodi/addons/plugin.video.wonderfulsubs/default.py", line 219, in <module>
                                            router_process(control.get_plugin_url(), control.get_plugin_params())
                                          File "/storage/.kodi/addons/plugin.video.wonderfulsubs/resources/lib/ui/router.py", line 68, in router_process
                                            return route_obj.func(payload, params)
                                          File "/storage/.kodi/addons/plugin.video.wonderfulsubs/default.py", line 87, in ANIMES_PAGE
                                            episodes = _BROWSER.get_anime_episodes(anime_url, is_dubbed, season, desc_order)
                                          File "/storage/.kodi/addons/plugin.video.wonderfulsubs/resources/lib/WonderfulSubsBrowser.py", line 350, in get_anime_episodes
                                            return self._get_anime_episodes(info, season, desc_order)
                                          File "/storage/.kodi/addons/plugin.video.wonderfulsubs/resources/lib/WonderfulSubsBrowser.py", line 266, in _get_anime_episodes
                                            episodes = sorted(season["episodes"].values(), reverse=desc_order, key=lambda x:
                                          File "/storage/.kodi/addons/plugin.video.wonderfulsubs/resources/lib/WonderfulSubsBrowser.py", line 267, in <lambda>
                                            float(x["id"]))
                                        ValueError: could not convert string to float: None
                                        -->End of Python script error report<--
2019-04-22 01:05:37.222 T:3516920688   ERROR: GetDirectory - Error getting plugin://plugin.video.wonderfulsubs/animes/aikazero/sub/0
2019-04-22 01:05:37.237 T:4091255184   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.wonderfulsubs/animes/aikazero/sub/0) failed

I get the exact same error for multiple titles (summarizing some examples here):

2019-04-22 00:26:38.647 T:4091255184   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.wonderfulsubs/animes/aikar16virginmission/sub) failed
2019-04-22 01:00:22.370 T:4091255184   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.wonderfulsubs/animes/wakeupgirlzoomiyagiprdego/sub) failed
2019-04-22 01:01:04.606 T:4091255184   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.wonderfulsubs/animes/tokyobabylon/dub) failed
2019-04-22 01:03:13.263 T:4091255184   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.wonderfulsubs/animes/shinanomainichishinbun/sub) failed
2019-04-22 01:04:13.750 T:4091255184   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.wonderfulsubs/animes/touyamasakurauchuuchouyatsunonawagold/sub) failed

Other titles are working fine. Seems like a hit & miss with regards to which titles work/don't

Here's some details on my setup from the start of kodi.log:

2019-04-21 23:58:28.321 T:4091255184  NOTICE: -----------------------------------------------------------------------
2019-04-21 23:58:28.321 T:4091255184  NOTICE: Starting Kodi (18.1 Git:18.1-Leia). Platform: Linux ARM 32-bit
2019-04-21 23:58:28.321 T:4091255184  NOTICE: Using Release Kodi x32 build
2019-04-21 23:58:28.322 T:4091255184  NOTICE: Kodi compiled 2019-02-27 by GCC 8.2.0 for Linux ARM 32-bit version 3.14.29 (200221)
2019-04-21 23:58:28.322 T:4091255184  NOTICE: Running on CoreELEC (official): 9.0.1, kernel: Linux ARM 64-bit version 3.14.29 aarch64
2019-04-21 23:58:28.322 T:4091255184  NOTICE: FFmpeg version/source: 4.0.3-Kodi
2019-04-21 23:58:28.322 T:4091255184  NOTICE: Host CPU: AArch64 Processor rev 4 (aarch64), 4 cores available
2019-04-21 23:58:28.322 T:4091255184  NOTICE: ARM Features: Neon enabled

Thank you for a great plugin. :)

@SwagOtaku
Copy link
Collaborator

SwagOtaku commented Apr 22, 2019

Currently ovas and movies dont work in addon due to labeling issue on site, @RedNinjaX is working on fixing that

@SwagOtaku SwagOtaku added the WonderfulSubs Issue related to site label Apr 22, 2019
@Tae22
Copy link

Tae22 commented May 6, 2019

I am having trouble with the newer episodes to watch anime. The servers that support Dash and HLS does not seem to work for the kodi addon on my computer. Is there a way to make it work? Thank you for taking the time to read this message.

@SasukeShiro
Copy link

@Tae22
Copy link

Tae22 commented May 10, 2019

@SasukeShiro I went and did the instructions as mentioned and I still have the same problem trying to play the videos that support Dash and HLS

@sekiro02212
Copy link

I am also having the same problem as @Tae22 for certain animes they only have the server option of DASH and HLC and no matter how many times I enable the inputstream adaptive it still does not work and also I updated kodi to the newest version. Is there any other way to get it to work? @DxCx

@doko-desuka
Copy link
Contributor

doko-desuka commented May 22, 2019

I have a slow WI-FI connection and I don't use inputstream-adaptive.
If you take this snippet...

    r = http.send_request(item.getPath())
    if r.ok:
        lines = r.text.split('\n')
        for index, line in enumerate(lines):
            # On the line below you can change the number to one of: 240, 360, 480, 720, 1080.
            # Keep the 'x' and the comma as they are.
            if 'x480,' in line:
                item.setPath(lines[index+1])
                return item
    return item

...and add it to this line here of the HLS handling function (hitting Enter once so the "import" line and evertything below it goes down and making sure the blank spaces to the left are the same, before pasting that code), you can hardcode a resolution that the HLS source should always use.
In my case I hardcoded to 480 which is decent/fast enough. If it doesn't find your desired resolution, that code will return the item as it is, making the Kodi player (FFMpeg) default to the highest quality available.

So the entire _HLS_HOOK() function can look like this: https://pastebin.com/pj3t5ATW

@SasukeShiro
Copy link

SasukeShiro commented May 23, 2019

You can also go to inputstream adaptive and under settings set resolution from auto to manual.

When you play hls or dash source it will be lowest res, but then you can change it by clicking the cog in player bar

@SasukeShiro
Copy link

@Tae22 @sekiro02212

SwagOtaku pushed a commit to SwagOtaku/plugin.video.wonderfulsubs-1 that referenced this issue Jun 21, 2019
@bsmith456
Copy link

any progress on movie labels not showing up in kodi from RedninjaX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WonderfulSubs Issue related to site
Projects
None yet
Development

No branches or pull requests

7 participants