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

Can't do anything, crash. #60

Closed
ghost opened this issue Sep 3, 2016 · 27 comments
Closed

Can't do anything, crash. #60

ghost opened this issue Sep 3, 2016 · 27 comments

Comments

@ghost
Copy link

ghost commented Sep 3, 2016

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 <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 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

@jdf76
Copy link
Collaborator

jdf76 commented Sep 3, 2016

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 [email protected] 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 #60, or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLVrE07FdXHNNoISf2jPItOCDHFesks5qmf-3gaJpZM4J0auM.

@ghost
Copy link
Author

ghost commented Sep 4, 2016

@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
Copy link
Collaborator

jdf76 commented Sep 4, 2016

Try it with 16.1

Jeff

On Sep 3, 2016, at 8:22 PM, ragama [email protected] 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 #60 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLQM78ggrXXMD4OMc_3UOWEWlevQGks5qmg80gaJpZM4J0auM.

@ghost
Copy link
Author

ghost commented Sep 4, 2016

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

@jdf76
Copy link
Collaborator

jdf76 commented Sep 4, 2016

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 [email protected] 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 #60 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLRZe0AuWQtGrmBL2GVmSXV1AxJIaks5qmhcJgaJpZM4J0auM.

@ghost
Copy link
Author

ghost commented Sep 4, 2016

@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
Copy link
Collaborator

jdf76 commented Sep 4, 2016

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 [email protected] 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 #60 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ALozLR1CQ9XnaqOUtCFIEbCxy3js-8Uwks5qmhl_gaJpZM4J0auM.

@opeeba
Copy link

opeeba commented Sep 8, 2016

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
Copy link

marianozunino commented Sep 8, 2016

@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
Copy link

opeeba commented Sep 8, 2016

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

@dencrypt
Copy link

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
Copy link

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
Copy link

@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
Copy link

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

@helllamer
Copy link

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
Copy link

X-dark commented Oct 7, 2016

Any more clue on this?

@helllamer
Copy link

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
Copy link

Got a solution for you folks.

pip install pyopenssl==0.15.1

Just restart kodi, and enjoy.

@candrews
Copy link

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

@opeeba
Copy link

opeeba commented Oct 12, 2016

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

@ImNtReal
Copy link

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
Copy link

imsodin commented Nov 8, 2016

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.

@jdf76 jdf76 closed this as completed Nov 8, 2016
@ianepreston
Copy link

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

@noam09
Copy link

noam09 commented Dec 5, 2016

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:

  • python-openssl package for Ubuntu 16.04.1 is stuck at 0.15.1
  • deluged depends on it, because
  • I can't import OpenSSL even though the python-openssl (Ubuntu) package is installed, can only import when installed with pip

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
Copy link

arigit commented Jan 18, 2017

@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
Copy link
Collaborator

jdf76 commented Jan 18, 2017 via email

@bbogart
Copy link

bbogart commented Jan 20, 2017

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

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

No branches or pull requests