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

Invalid URL 'http://': No host supplied #10

Closed
anxdpanic opened this issue Sep 13, 2020 · 37 comments · Fixed by #9
Closed

Invalid URL 'http://': No host supplied #10

anxdpanic opened this issue Sep 13, 2020 · 37 comments · Fixed by #9

Comments

@anxdpanic
Copy link
Owner

jdf76/plugin.video.youtube#870

@anxdpanic anxdpanic linked a pull request Sep 13, 2020 that will close this issue
@anxdpanic
Copy link
Owner Author

@jmbreuer
Copy link
Contributor

This started to happen for me last night, only with videos that are / mostly contain music.

See: https://forum.kodi.tv/showthread.php?tid=356934&pid=2983904#pid2983904
and my log: https://paste.kodi.tv/heyiqiyadu.kodi

@thecosmicslug
Copy link

started to happen yesterday on our Kodi installation, the beta doesn't seem any different. it seems to be only music videos affected.

@X-dark
Copy link

X-dark commented Oct 29, 2020

I can confirm this is still happening with 6.8.7:

2020-10-29 13:36:57.175 T:139768501376576   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!                          
                                            Error Type: <class 'requests.exceptions.InvalidURL'>                
                                            Error Contents: Invalid URL u'http://': No host supplied                                
                                            Traceback (most recent call last):                                                          
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/default.py", line 15, in <module>
                                                runner.run(__provider__)                                                                
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/runner.py", line 60, in run
                                                __RUNNER__.run(provider, context)                                                       
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/impl/xbmc/xbmc_runner.py", line 33, in run
                                                results = provider.navigate(context)                                                    
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/abstract_provider.py", line 105, in navigate
                                                result = method(context, re_match)                                                      
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/register_provider_path.py", line 19, in wrapper
                                                return func(*args, **kwargs)                                              
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/provider.py", line 768, in on_play
                                                return yt_play.play_video(self, context)                                  
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/yt_play.py", line 50, in play_video
                                                video_streams = client.get_video_streams(context, video_id)                             
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py", line 100, in get_video_streams
                                                video_streams = video_info.load_stream_infos(video_id)                                  
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 506, in load_stream_infos
                                                return self._method_get_video_info(video_id)                            
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 892, in _method_get_video_info
                                                license_info.get('url'))                                                                
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 1197, in generate_mpd
                                                url = ''.join([url, sig_param, cipher.get_signature(stream_map['s'])])                  
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/signature/cipher.py", line 32, in get_signature
                                                json_script = function_cache.get(FunctionCache.ONE_DAY, self._load_json_script, self._javascript_url)
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/utils/function_cache.py", line 108, in get
                                                cached_data = partial_func()
                                              File "/home/xbmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/signature/cipher.py", line 52, in _load_json_script
                                                result = requests.get(url, headers=headers, verify=self._verify, allow_redirects=True)
                                              File "/home/xbmc/.kodi/addons/script.module.requests/lib/requests/api.py", line 75, in get
                                                return request('get', url, params=params, **kwargs)
                                              File "/home/xbmc/.kodi/addons/script.module.requests/lib/requests/api.py", line 60, in request
                                                return session.request(method=method, url=url, **kwargs)
                                              File "/home/xbmc/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 519, in request
                                                prep = self.prepare_request(req)
                                              File "/home/xbmc/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 462, in prepare_request
                                                hooks=merge_hooks(request.hooks, self.hooks),
                                              File "/home/xbmc/.kodi/addons/script.module.requests/lib/requests/models.py", line 313, in prepare
                                                self.prepare_url(url, params)
                                              File "/home/xbmc/.kodi/addons/script.module.requests/lib/requests/models.py", line 390, in prepare_url
                                                raise InvalidURL("Invalid URL %r: No host supplied" % url)
                                            InvalidURL: Invalid URL u'http://': No host supplied
                                            -->End of Python script error report<--
2020-10-29 13:36:57.304 T:139771905555136   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/play/?video_id=zSvdLcS62ZM]

@ChrisEt
Copy link

ChrisEt commented Oct 29, 2020

I had the same problem today with v6.8.4, mostly with music-related videos.
I updated my plugins, with v6.8.7 the problem doesn't show anymore. 👍 Well done guys!

@gedreano
Copy link

InvalidURL: Invalid URL u'http://': No host supplied in v6.8.7

kodi.log

@LiquidSky
Copy link

Still happening with 6.8.8~beta1:

KodiLog.log

@ypcyc
Copy link

ypcyc commented Jan 26, 2021

Did something change? I've started getting this error today with version 6.8.9

021-01-26 20:43:40.853 T:140612565186304   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'requests.exceptions.InvalidURL'>
                                            Error Contents: Invalid URL u'http://': No host supplied
                                            Traceback (most recent call last):
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/default.py", line 15, in <module>
                                                runner.run(__provider__)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/runner.py", line 60, in run
                                                __RUNNER__.run(provider, context)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/impl/xbmc/xbmc_runner.py", line 33, in run
                                                results = provider.navigate(context)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/abstract_provider.py", line 105, in navigate
                                                result = method(context, re_match)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/register_provider_path.py", line 19, in wrapper
                                                return func(*args, **kwargs)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/provider.py", line 767, in on_play
                                                return yt_play.play_video(self, context)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/yt_play.py", line 50, in play_video
                                                video_streams = client.get_video_streams(context, video_id)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py", line 104, in get_video_streams
                                                video_streams = video_info.load_stream_infos(video_id)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 515, in load_stream_infos
                                                return self._method_get_video_info(video_id)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 911, in _method_get_video_info
                                                license_info.get('url'))
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 1216, in generate_mpd
                                                url = ''.join([url, sig_param, cipher.get_signature(stream_map['s'])])
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/signature/cipher.py", line 32, in get_signature
                                                json_script = function_cache.get(FunctionCache.ONE_DAY, self._load_json_script, self._javascript_url)
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/utils/function_cache.py", line 108, in get
                                                cached_data = partial_func()
                                              File "/opt/Kodi18/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/signature/cipher.py", line 52, in _load_json_script
                                                result = requests.get(url, headers=headers, verify=self._verify, allow_redirects=True)
                                              File "/opt/Kodi18/.kodi/addons/script.module.requests/lib/requests/api.py", line 75, in get
                                                return request('get', url, params=params, **kwargs)
                                              File "/opt/Kodi18/.kodi/addons/script.module.requests/lib/requests/api.py", line 60, in request
                                                return session.request(method=method, url=url, **kwargs)
                                              File "/opt/Kodi18/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 519, in request
                                                prep = self.prepare_request(req)
                                              File "/opt/Kodi18/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 462, in prepare_request
                                                hooks=merge_hooks(request.hooks, self.hooks),
                                              File "/opt/Kodi18/.kodi/addons/script.module.requests/lib/requests/models.py", line 313, in prepare
                                                self.prepare_url(url, params)
                                              File "/opt/Kodi18/.kodi/addons/script.module.requests/lib/requests/models.py", line 390, in prepare_url
                                                raise InvalidURL("Invalid URL %r: No host supplied" % url)
                                            InvalidURL: Invalid URL u'http://': No host supplied
                                            -->End of Python script error report<--

@rome2
Copy link

rome2 commented Jan 30, 2021

Same here for the last two weeks. I have the same impression that the add on is mostly throwing this error on music related videos. But this doesn't mean that only official music videos or rip offs are affected. Also synthesizer presentations or a video where someone presents an old church organ are throwing this error. Both didn't have anything copyright worthy material in them. The URLs themselves look fine and open without problems in a browser on the same device.

@ypcyc
Copy link

ypcyc commented Jan 30, 2021

@rome2
I did this:
Kodi Yotube plugin: * Settings - Maintenance - Delete access_manager.json and then re-login (not re-entering keys)

After that re-login with Google account NOT YouTube account!

@rome2
Copy link

rome2 commented Jan 30, 2021

Thank you very much for your reply. I went through this procedure already a few days ago and now I just tried it again. This makes no difference at all. I only have one account for youtube, google and the API keys so no confusion there.

Just a random link from youtube's suggestions (a classical piece with anonymous music from the 16th century):

https://www.youtube.com/watch?v=9UTe8zQBlT8

The log looks exactly like the one you posted above.

@criterion9
Copy link

I am also getting this error for some videos. I tried not logged in & logged in but that made no difference. It would seem that somewhere in the stack it is not getting a url to request and ends up passing nothing for the request.

File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py", line 104, in get_video_streams
video_streams = video_info.load_stream_infos(video_id)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 515, in load_stream_infos
return self._method_get_video_info(video_id)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 911, in _method_get_video_info
license_info.get('url'))
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 1216, in generate_mpd
url = ''.join([url, sig_param, cipher.get_signature(stream_map['s'])])
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/signature/cipher.py", line 32, in get_signature
json_script = function_cache.get(FunctionCache.ONE_DAY, self._load_json_script, self._javascript_url)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/utils/function_cache.py", line 108, in get
cached_data = partial_func()
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/signature/cipher.py", line 52, in _load_json_script
result = requests.get(url, headers=headers, verify=self._verify, allow_redirects=True)
File "/storage/.kodi/addons/script.module.requests/lib/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 519, in request
prep = self.prepare_request(req)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 313, in prepare
self.prepare_url(url, params)
File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 390, in prepare_url
raise InvalidURL("Invalid URL %r: No host supplied" % url)
InvalidURL: Invalid URL u'http://': No host supplied

@MetalGuardian
Copy link

Also started getting this error today, plugin version: 6.8.9

@Griff1984
Copy link

Same issue as of 5th Feb (2021).
However, i managed to make all videos by signing-out.
As a trial I created a new google account - signed in using the new account, and all videos play.
Have tried logging back in using the original account, and same videos do not play (tried several different devices, and fresh kodi install - same issue when logged in with my original account).
Not sure why it would work with one account and not another. API keys were the same.

thomazz-nl added a commit to thomazz-nl/plugin.video.youtube that referenced this issue Feb 9, 2021
@GothicChris
Copy link

Same Issue here. For me it did NOT work to use another account. Also a re-login didn't worked.

Any other ideas so far?

System:
Kodi 18.0 - LibreELEC
Raspberry Pi B
Youtube 6.8.9

@rome2
Copy link

rome2 commented Feb 10, 2021

Same here. After signing out all videos play fine, logging in again and this error appears. Using a different account or a fresh Kodi installation on a different platform doesn't make a difference.

I've also gone through all the settings in my Youtube and Google accounts but none of the available parameters seems to change anything.

Surprisingly one of the videos that failed previously now works. I've asked the channel owner what she had changed and her answer was that she hadn't touched this video at all after the initial upload.

@wrapper
Copy link

wrapper commented Feb 10, 2021

+1 also getting this issue on music related videos in particular

@rome2
Copy link

rome2 commented Feb 10, 2021

Maybe the location has something to do with it. I'm in Germany and the content production industry is very aggressive around here.

@thecosmicslug
Copy link

I have been getting this error on mostly music videos also, uk location here

@anxdpanic
Copy link
Owner Author

Are you all using Kodi 18? I'll generate a test zip or two to see if we can fix/get to the bottom of it.

I stepped away for ~ a month, should hopefully be more active again.

@criterion9
Copy link

I am on Kodi 18 yes. Thanks for looking into it

@anxdpanic
Copy link
Owner Author

Can you test and confirm if the issue is resolved in the attached zip. Thanks in advance 👍 plugin.video.youtube-6.8.9-test1.zip

@wanaxe
Copy link

wanaxe commented Feb 11, 2021

Can you test and confirm if the issue is resolved in the attached zip. Thanks in advance 👍 plugin.video.youtube-6.8.9-test1.zip

Yes, the issue solved. It works for Kodi 18.8 on OSMC. Thank you so much!!!

@joshg253
Copy link

Can you test and confirm if the issue is resolved in the attached zip. Thanks in advance 👍 plugin.video.youtube-6.8.9-test1.zip

Yes, the issue solved. It works for Kodi 18.8 on OSMC. Thank you so much!!!

Fix works for me as well: Kodi 18.9 on Element "Fire TV Edition" (Android).

anxdpanic pushed a commit that referenced this issue Feb 11, 2021
@anxdpanic
Copy link
Owner Author

I've updated the development repos and https://github.com/anxdpanic/plugin.video.youtube/releases/tag/6.x.x-dev with all the zips. Thanks everyone for testing and confirming.

@GothicChris
Copy link

Can you test and confirm if the issue is resolved in the attached zip. Thanks in advance 👍 plugin.video.youtube-6.8.9-test1.zip

Thank you. The Fix also works for me on Kodi 18.0 (LibreELEC).

@Griff1984
Copy link

Fix works on windows 10 Kodi 18.9
Thank you.

@jmweir
Copy link

jmweir commented Feb 13, 2021

Hey @anxdpanic thank you very much for your hard work. I also confirm with your just released version that some videos which did not play for me are now playing.

@Daidalos117
Copy link

I can confirm that updated version works. Thank you @anxdpanic for your awesome work man!

@bratekarate
Copy link

bratekarate commented Feb 13, 2021

I tried the Matrix version. Some videos work, but the majority throws a new error from inputstream.adaptive when using MPD:

ERROR <general>: IAddonInstanceHandler::CreateInstance: inputstream.adaptive returned bad status "Permanent failure" during instance creation.

Any Ideas?

EDIT: Very weird, I reverted back to the stable release, restarted Kodi and the entire issue with Invalid URL disappeared. The aforementioned issue also does not occur anymore.

I will report back if I manage to get the devel zips working with inputstream.adaptive after another restart.

EDIT2: All worked fine after a reboot. Ignore my comment.

@mikromcz
Copy link

I have vener this issue here in the Czech Republic, but yesterday I noticed that music videos can't be played.
same error like here.
with alpha1 version it is working again, thank you.

@teodoryantcheff
Copy link

Just so my debug info lives here as well -- #60 (comment)

Using 6.8.10-alpha fixed it for me.

@jleehart
Copy link

I've updated the development repos and https://github.com/anxdpanic/plugin.video.youtube/releases/tag/6.x.x-dev with all the zips. Thanks everyone for testing and confirming.

Thank you very much from Russia

@ghen2
Copy link

ghen2 commented Feb 20, 2021

I've updated the development repos and https://github.com/anxdpanic/plugin.video.youtube/releases/tag/6.x.x-dev with all the zips. Thanks everyone for testing and confirming.

6.8.10 alpha1 confirmed playing music videos again on Kodi 18.

This was referenced Feb 22, 2021
@Sergio-Morello
Copy link

Можете ли вы проверить и подтвердить, решена ли проблема в прилагаемом zip-архиве. заранее спасибо plugin.video.youtube-6.8.9-test1.zip

Good day.
I have the problem described here.
I am trying to install this plugin from a zip file but I get a message that xbmc.pithon ver 2.20.0 was not found.
what am I doing wrong? And how to fix it.
Thank you.

@Chklang
Copy link

Chklang commented Feb 26, 2021

Yes! Thank you for the 6.8.10, the bug is DOWN :)

@Kunstbanause
Copy link

I've updated the development repos and https://github.com/anxdpanic/plugin.video.youtube/releases/tag/6.x.x-dev with all the zips. Thanks everyone for testing and confirming.

6.8.10 alpha1 confirmed playing music videos again on Kodi 18.

I can confirm music related videos work now for me on raspi 4, libreelec, kodi

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

Successfully merging a pull request may close this issue.