2019-04-05, 15:41
My addon calls Youtube.dl's YDStreamExtractor.getVideoInfo. My addon also imports from __future__ and calls standard_library.install_aliases().
The call works fine if I comment out install_aliases(), but otherwise returns None. I was a bit surprised to see that using future in my module would impact use of referenced a referenced addon, but then I am still fairly new to python. I suspect the issue is over httplib, urllib or urlparse.
Is there a known work around to this?
I probably could work around using install_aliases(), but that would be a mountain of work. I am sure that I could create a separate service to make the call and then use addonSignals (which I am already using), but that is not ideal, but what I will probably end up doing.
For the code curious:
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
from future import standard_library
from future.utils import native
# standard_library.install_aliases()
import YDStreamExtractor
import xbmc
import pydevd
import sys
...
url = 'ozf32hrXGiY'
x = YDStreamExtractor.getVideoInfo(native(url.encode('utf-8')), quality=1)
Returns None if I uncomment out install_aliases, above.
The call works fine if I comment out install_aliases(), but otherwise returns None. I was a bit surprised to see that using future in my module would impact use of referenced a referenced addon, but then I am still fairly new to python. I suspect the issue is over httplib, urllib or urlparse.
Is there a known work around to this?
I probably could work around using install_aliases(), but that would be a mountain of work. I am sure that I could create a separate service to make the call and then use addonSignals (which I am already using), but that is not ideal, but what I will probably end up doing.
For the code curious:
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
from future import standard_library
from future.utils import native
# standard_library.install_aliases()
import YDStreamExtractor
import xbmc
import pydevd
import sys
...
url = 'ozf32hrXGiY'
x = YDStreamExtractor.getVideoInfo(native(url.encode('utf-8')), quality=1)
Returns None if I uncomment out install_aliases, above.