Tools for kodi video scrap addon in python 3
#1
Hey,...

I desire to update my video python 2 addon to python 3...

my python 2 video addon used  CommonFunctions from script.common.plugin.cache
but
it seems  not working with python 3 version...at this moment

so i have tried with  BeautifulSoup but no working  too.....

so my question is this one,....

what are the tools that i can use  to make a functionnal video scrap addon with kodi python 3 version,.....?

EDIT:: SOrry.. i havent seen that post --->>> :: https://forum.kodi.tv/showthread.php?tid=325637
Reply
#2
a python 3 compatible version of Beautifulsoup is available in our repo for v19:
http://mirrors.kodi.tv/addons/migration/...ifulsoup4/
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2019-04-03, 17:54)ronie Wrote: a python 3 compatible version of Beautifulsoup is available in our repo for v19:
http://mirrors.kodi.tv/addons/migration/...ifulsoup4/

Hey ronie,...

Thx  for your intervention,...

but i still have issues with ""import from zip"" the file :  script.module.beautifulsoup4-4.6.0.0.zip

after manual install of the beautifulsoup addon,
i have got  this error :

Code:
ImportError: No module named html.entities

after manual add of html  lib from python 3 install folder,..

i have this issue


Code:
Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: chr() arg not in range(256)

""and it s apparenetly related to the fact that  Python 2 chr give  a one character string in the ASCII range. This is an 8-bit string, so the maximum parameter value for
chr is 255.... In Python 3 you'll get a unicode character and unicode code points can go up to much higher values.""

...

have you an idea..?
Reply
#4
hard to tell without seeing the code and a full Debug Log.

looking at the error alone, i'd say your not using a py3 version of kodi... but that's just a guess.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2019-04-03, 22:45)ronie Wrote: ....
i'd say your not using a py3 version of kodi... but that's just a guess.

do you consider leia 18.1 version as a python3 kodi version..?
Reply
#6
nope, you need to install the 'feature_python3' test build of kodi.
they can be found here: http://mirrors.kodi.tv/test-builds/
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
(2019-04-03, 23:35)ronie Wrote: nope, you need to install the 'feature_python3' test build of kodi.
the can be found here: http://mirrors.kodi.tv/test-builds/

ohh thx for the info .....and sorry for misunderstanding..

i go catch this version 'feature_python3' test build of kodi...now.. Wink)

thx for the enlightenment,...Wink)
Reply
#8
@ronie 
I am trying to convert a couple of addons to py3 so that I may submit to the official repo.
I tried installing the script.common.plugin.cache-2.5.10.zip from
Code:
http://mirrors.kodi.tv/addons/migration/script.common.plugin.cache/
It immediately gives an error on install
from the log file
Code:
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'AttributeError'>
Error Contents: 'str' object has no attribute 'decode'
Traceback (most recent call last):
File "/home/gujal/.kodi/addons/script.common.plugin.cache/default.py", line 40, in <module>
 run()
File "/home/gujal/.kodi/addons/script.common.plugin.cache/default.py", line 30, in run
 sys.path = [settings.getAddonInfo('path').decode('utf-8') + "/lib"] + sys.path
AttributeError: 'str' object has no attribute 'decode'
-->End of Python script error report<--
From the error, it looks like the module is still using python2 calls and is not updated for python3
Here is the full debug log
https://paste.kodi.tv/ilopinunuj.kodi

Please advise
Kodi 22 nightly Windows 10 and 11 | 21.1 Xbox One X | 22 nightly Linux Mint Wilma XFCE | CoreELEC NO 22 nightly S905X4 aarch64
Reply
#9
correct, script.common.plugin.cache has not been updated to python3.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#10
@ronie

i come back to you because i still have issue with the script.module.beautifulsoup4-4.6.0.0.zip and the KodiSetup-20190305-66746cbe-feature_python3-x64.exe

i cant install from zip

the original addon.xml of beautifulsoup4-4.6.0.0 has xbmc.python"  version="2.25.0"

i have modified this to xbmc.python"  version="2.26.0"

but with no succes

and when i add manually script.module.beautifulsoup4-4.6.0.0
i have an import error  on from bs4 import BeautifulSoup


SOLUTION :
i have put some lib from python 3 install folder in my addon folder to do the trick


,....
Reply

Logout Mark Read Team Forum Stats Members Help
Tools for kodi video scrap addon in python 30