2015-06-09, 07:05
(2015-06-08, 23:51)bromix Wrote: This endpoint is an URI. You have to call it url encoded
Thanks for spotting that - I had indeed forgotten to encode that - now calling urllib.quote_plus() to encode the string before sending it, and that results in the name:
Code:
plugin://plugin.video.vimeo/search/?q=The%20Breakfast%20Club%20%c3%a9%20Extras
I hope that's OK (I'm rubbish at this encoding stuff!)
But I still get the error:
Code:
06:00:39 T:5132 DEBUG: [plugin.video.vimeo] Starting Kodion framework by bromix...
06:00:39 T:5132 NOTICE: [plugin.video.vimeo] Running: Vimeo (4.1.2) on Helix (14.0) with Python 2.7.8
06:00:39 T:5132 DEBUG: [plugin.video.vimeo] Path: "/search/
06:00:39 T:5132 DEBUG: [plugin.video.vimeo] Params: "{'q': u'The Breakfast Club \xe9 Extras'}"
06:00:39 T:5132 DEBUG: [plugin.video.vimeo] Setting content-type: "episodes" for "/search/"
06:00:39 T:5132 ERROR: C:\XBMC\Kodi-14-Helix\system\python\Lib\urllib.py:1288: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
return ''.join(map(quoter, s))
06:00:39 T:5132 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: u'\xe9'
Traceback (most recent call last):
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\default.py", line 7, in <module>
runner.run(__provider__)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\kodion\runner.py", line 32, in run
__RUNNER__.run(provider, context)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\kodion\impl\xbmc\xbmc_runner.py", line 23, in run
results = provider.navigate(context)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\kodion\abstract_provider.py", line 123, in navigate
result = method(context, re_match)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\kodion\register_provider_path.py", line 12, in wrapper
return func(*args, **kwargs)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\vimeo\provider.py", line 116, in endpoint_search
return self.on_search(query, context, re_match)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\vimeo\provider.py", line 125, in on_search
xml = client.search(query=search_text, page=page)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\vimeo\client.py", line 66, in search
post_data=post_data)
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\vimeo\client.py", line 516, in _perform_v2_request
_headers.update(self._create_authorization(url, method, oauth_parms))
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\vimeo\client.py", line 486, in _create_authorization
base_string += _percent_encode(_normalize_parameters(all_params))
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\vimeo\client.py", line 463, in _normalize_parameters
list_of_params.append('%s=%s' % (key, _percent_encode(value)))
File "C:\XBMC\Kodi-14-Helix\portable_data\addons\plugin.video.vimeo\resources\lib\vimeo\client.py", line 442, in _percent_encode
result = urllib.quote_plus(s).replace('+', '%20').replace('*', '%2A').replace('%7E', '~')
File "C:\XBMC\Kodi-14-Helix\system\python\Lib\urllib.py", line 1293, in quote_plus
s = quote(s, safe + ' ')
File "C:\XBMC\Kodi-14-Helix\system\python\Lib\urllib.py", line 1288, in quote
return ''.join(map(quoter, s))
KeyError: u'\xe9'
-->End of Python script error report<--
06:00:39 T:5132 INFO: Python script stopped
06:00:39 T:5132 DEBUG: Thread LanguageInvoker 5132 terminating
06:00:39 T:6012 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
06:00:39 T:3180 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - plugin exited prematurely - terminating
06:00:39 T:6012 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.vimeo/search/?q=The%20Breakfast%20Club%20%c3%a9%20Extras
06:00:39 T:6012 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.vimeo/search/?q=The%20Breakfast%20Club%20%c3%a9%20Extras) failed
Thanks
Rob