Kolifanes / plugin.video.youtube

YouTube for Kodi with API fixed
GNU General Public License v2.0
119 stars 44 forks source link

Can't do anything, crash. #60

Closed ghost closed 7 years ago

ghost commented 8 years ago

`20:10:50 T:140092208310016 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

jdf76 commented 8 years ago

Exit youtube.

Delete /var/lib/kodi/.kodi/userdata/addons_data/plugin.video.youtube

restart youtube. It will do the re-configure.

By the way no one is testing 17. I found it works on alpha3.

What distro are you using?

Jeff

On Sep 3, 2016, at 7:16 PM, ragama notifications@github.com wrote:

20:10:50 T:140092208310016 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

  • NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'urllib2.URLError'> Error Contents: <urlopen error [Errno 0] Error> Traceback (most recent call last): File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/default.py", line 7, in runner.run(provider) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run RUNNER.run(provider, context) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run results = provider.navigate(context) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate result = method(context, re_match) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 255, in _internal_search return self.on_search(query, context, re_match) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 477, in on_search page_token=page_token) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/function_cache.py", line 107, in get cached_data = partial_func() File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 488, in search return self._perform_v3_request(method='GET', path='search', params=params, quota_optimized=False) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 615, in _perform_v3_request result = requests.get(_url, params=_params, headers=_headers, verify=False, allow_redirects=allow_redirects) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 179, in get return _request('GET', url, *_kwargs) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 155, in _request response = opener.open(request) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(_args) File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open context=self._context) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) URLError: <urlopen error [Errno 0] Error> -->End of Python script error report<-- 20:10:50 T:140094213235968 ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/kodion/search/query/?q=acdx 20:10:50 T:140094213235968 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/kodion/search/query/?q=acdx) failed 20:10:50 T:140092208310016 NOTICE: [plugin.video.youtube] Running: YouTube (5.2.2) on Jarvis (16.1) with Python 2.7.12

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kolifanes/plugin.video.youtube/issues/60, or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLVrE07FdXHNNoISf2jPItOCDHFesks5qmf-3gaJpZM4J0auM.

ghost commented 8 years ago

@jdf76 Already did that, a bunch of times :/.

Any other tips?

I compiled 17 yesterday, took like 2 and a half hours, but I found it a bit laggy and removed it.

And youtube behaves exactly the same. I works after kodi installation, but when I close it and open it again, it does't work anymore.

I'm using archlinux x64.

jdf76 commented 8 years ago

Try it with 16.1

Jeff

On Sep 3, 2016, at 8:22 PM, ragama notifications@github.com wrote:

@jdf76 https://github.com/jdf76 Already did that, a bunch of times :/.

Any other tips?

I compiled 17 yesterday, took like 2 and a half hours, but I found it a bit laggy and removed it.

And youtube behaves exactly the same. I works after kodi installation, but when I close it and open it again, it does't work anymore.

I'm using archlinux x64.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kolifanes/plugin.video.youtube/issues/60#issuecomment-244577155, or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLQM78ggrXXMD4OMc_3UOWEWlevQGks5qmg80gaJpZM4J0auM.

ghost commented 8 years ago

@jdf76 I am using 16.1 Running: YouTube (5.2.2) on Jarvis (16.1) with Python 2.7.12

jdf76 commented 8 years ago

oh ok, I read 17 somewheres. did you compile yourself Kodi 16?

if you did, try just using the stock build thats put out there.

If you didn’t and are using the stock version, then unfortunately i’m not sure where to go next.

Thanks,

Jeff

On Sep 3, 2016, at 8:55 PM, ragama notifications@github.com wrote:

@jdf76 https://github.com/jdf76 I am using 16.1 Running: YouTube (5.2.2) on Jarvis (16.1) with Python 2.7.12

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kolifanes/plugin.video.youtube/issues/60#issuecomment-244578099, or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLRZe0AuWQtGrmBL2GVmSXV1AxJIaks5qmhcJgaJpZM4J0auM.

ghost commented 8 years ago

@jdf76 Yep, I'm using the ¨stock¨ version of Kodi 16.1 (I compiled the version 17). The weird is that if I uninstall kodi and install it again, youtube works again, but only for one time (if I close it stops working...)

jdf76 commented 8 years ago

Try going into the forums, i don’t think it’s a youtube plugin issue, if it were it should effect a lot of people. Try hitting up some of the people in forums to see what they think?

Thanks Jeff

On Sep 3, 2016, at 9:06 PM, ragama notifications@github.com wrote:

@jdf76 https://github.com/jdf76 Yep, I'm using the ¨stock¨ version of Kodi 16.1 (I compiled the version 17). The weird is that if I uninstall kodi and install it again, youtube works again, but only for one time (if I close it stops working...)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kolifanes/plugin.video.youtube/issues/60#issuecomment-244578371, or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLR1CQ9XnaqOUtCFIEbCxy3js-8Uwks5qmhl_gaJpZM4J0auM.

opeeba commented 8 years ago

I have been dealing with the same problem for a couple weeks. Same archlinux x64 setup. I have tried downgrading to previous versions of the youtube addon, python, and kodi with no success.

Why have all comments by @jdf76 disappeared?

marianozunino commented 8 years ago

@opeeba I have no idea about the missing comments. But I can tell you this about the youtube problem: Apparently, the problem only appears when you change the skin. If you keep the default one, youtube works just fine. Strange...but I have a working youtube now. Btw, I am @ragama, this is just another account :)

opeeba commented 7 years ago

@ragama I have only been using the default skin (Confluence)

dencrypt commented 7 years ago

This seems to be a problem with python. I get the same exact error after update with my TED-plugin. I am running Debian Testing and after updating today no videoplugins seems to work anymore.

dencrypt commented 7 years ago

I can confirm that the "problem" lies within Python 2.7.12. A lot of changes for urllib2 in that release that gives the URLError(err). I am no coder so I can't really say what needs to be changed for the plugin but a downgrade to 2.7.8 (I do not recommend this though) solved the problem for me and youtube is now working again.

marianozunino commented 7 years ago

@dencrypt currently I am using Python 2.7.12, and I have no problems with twitch/youtube. But if I change the skin... Pretty strange.

dencrypt commented 7 years ago

@forbi Then I can only guess what's causing it. Maybe the skin (confluence?) is somehow overriding the way the plugin retrieves urls?

helllamer commented 7 years ago
00:33:46 T:1601172384   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'urllib2.URLError'>
                                            Error Contents: <urlopen error [Errno -2] Name or service not known>
                                            Traceback (most recent call last):
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/default.py", line 7, in <module>
                                                runner.run(__provider__)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
                                                __RUNNER__.run(provider, context)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run
                                                results = provider.navigate(context)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate
                                                result = method(context, re_match)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 255, in _internal_search
                                                return self.on_search(query, context, re_match)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 477, in on_search
                                                page_token=page_token)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/function_cache.py", line 107, in get
                                                cached_data = partial_func()
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 488, in search
                                                return self._perform_v3_request(method='GET', path='search', params=params, quota_optimized=False)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 615, in _perform_v3_request
                                                result = requests.get(_url, params=_params, headers=_headers, verify=False, allow_redirects=allow_redirects)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 179, in get
                                                return _request('GET', url, **kwargs)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 155, in _request
                                                response = opener.open(request)
                                              File "/usr/lib/python2.7/urllib2.py", line 429, in open
                                                response = self._open(req, data)
                                              File "/usr/lib/python2.7/urllib2.py", line 447, in _open
                                                '_open', req)
                                              File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
                                                result = func(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
                                                context=self._context)
                                              File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
                                                raise URLError(err)
                                            URLError: <urlopen error [Errno -2] Name or service not known>
                                            -->End of Python script error report<--
00:33:46 T:1948526368   ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/kodion/search/query/?q="%d0%b0%d0%b1%d0%b2%d0%b3%d0%b4
00:33:46 T:1948526368   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/kodion/search/query/?q=%d0%b0%d0%b1%d0%b2%d0%b3%d0%b4) failed
00:33:46 T:1601172384  NOTICE: [plugin.video.youtube] Running: YouTube (5.2.1) on Jarvis (16.1) with Python 2.7.12

Backtrace looks mostly useless.

Tried to grab problematic URL using from api.py using:

153     response = None
154     print('XXXXXX: Requesting URL = ' + url)
155     try:                                                                                                                                  
156         response = opener.open(request)

but i have nothing in kodi logs. How to write values into kodi.log?

X-dark commented 7 years ago

Any more clue on this?

helllamer commented 7 years ago

I've forgot to write my findings. As for me, error <urlopen error [Errno -2] Name or service not known> was related to DNS/route/network settings on my rPI2 with ArchLinuxArm. Due to some misconfiguration in systemd-networkd or its dhcp-client, 1-2 minutes after device boot, network does not work properly. It looks like resolv.conf contains invalid content. I've not fixed it till now just because sshd also does not work during this 1-2 minutes lag.

xsellier commented 7 years ago

Got a solution for you folks.

pip install pyopenssl==0.15.1

Just restart kodi, and enjoy.

candrews commented 7 years ago

This sounds like it's probably the same issue that I reported to Kodi and pyopenssl: http://trac.kodi.tv/ticket/16914 https://github.com/pyca/pyopenssl/issues/542

opeeba commented 7 years ago

@xsellier Thank you for your solution. It works on Arch Linux when downgrading the python2-pyopenssl package to 0.15.1-3.

ImNtReal commented 7 years ago

It also works with 16.0. I got mine working by runninng pip install --user pyopenssl=16.0. Now, I just have to remember to remove the version installed under my home directory when this is fixed.

imsodin commented 7 years ago

This is supposedly fixed in pyopenssl 16.2 (see pyca/pyopenssl#542). I didn't test myself though as I am waiting for the official debian package.

ianepreston commented 7 years ago

Upgraded to pyopenssl 16.2 in Ubuntu 16.10 and it worked! This was driving me insane!

noam09 commented 7 years ago

Hey, I realize this issue is closed but I'm still dealing with issues related to this.

OS: Ubuntu 16.04.1 LTS Kodi: Jarvis 16.1 git c327c53

I have pyOpenSSL installed with pip because:

The problem in my case is that when pyOpenSSL (16.2) is installed with pip, it breaks the YouTube addon functionality (same urlopen Errno 0 error). Same goes for 0.15.1 installed with pip. If I pip uninstall pyopenssl YouTube works again.

Anyone know why this may be happening, or can think of a workaround? Basically, I want Kodi to use pyOpenSSL with its default library's package, and not the one I installed with pip (although I don't see why it should work with pip's package). Thanks for any tips.

EDIT Dec 13: The latest version of cryptography (1.7) seems to have fixed this issue, and the extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter. Returning 0. issue along with it (related).

arigit commented 7 years ago

@noam09 thanks for the follow up. Same issue happening on Fedora 25 with Kodi 17RC3

These two commands did the trick:

pip install pyopenssl --upgrade pip install cryptography --upgrade

jdf76 commented 7 years ago

This repo is no longer updated.

try jdf76/plugin.video.youtube.

Also you may get further by hitting the forums on http://forum.kodi.tv/showthread.php?tid=267160 http://forum.kodi.tv/showthread.php?tid=267160

Thanks Jeff

On Jan 18, 2017, at 11:13 AM, Ari notifications@github.com wrote:

@noam09 https://github.com/noam09 thanks for the follow up. Same issue happening on Fedora 25 with Kodi 17RC3

These two commands did the trick:

pip install pyopenssl --upgrade pip install cryptography --upgrade

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Kolifanes/plugin.video.youtube/issues/60#issuecomment-273520039, or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLYreFlHYs-vB4upUBR9d6hYe2pbhks5rTjoRgaJpZM4J0auM.

bbogart commented 7 years ago

@arigit: reinstalling pyopenssl and cryptography did not resolve anything for me. Posted as issue on the new plugin repo: https://github.com/jdf76/plugin.video.youtube/issues/14