kodi-connect / kodi-connect-addon

MIT License
27 stars 16 forks source link

Python 3 support #35

Open BUGBEAR7 opened 3 years ago

BUGBEAR7 commented 3 years ago

Hello I have been using this addon for last 1 year in my Kodi Krypton , but recently have to update the Kodi because few addon now does not support in old Kodi build. Recently updated to Kodi Matrix as we all it does not support old python so I was wondering will there be any update for this addon

Thanks

tkislan commented 3 years ago

Hello, yes, I've done the compatibility update here: https://github.com/kodi-connect/kodi-connect-addon/pull/34 But it didn't help the person who was asking for it And my device doesn't yet have the update to new Kodi

Can you try the following version? plugin.video.kodiconnect-0.3.0.zip

BUGBEAR7 commented 3 years ago

Hello I just tried to install it , it gave me same error for missing python 2.14.0 I edited the addon.xml to "import addon="xbmc.python" version="3.0.0" It installed after that but after that got the error to check logs putted the login details after that

Logs 2021-05-25 18:15:09.340 T:12260 INFO : [script.logviewer] "GET /favicon.ico HTTP/1.1" 200 - 2021-05-25 18:15:12.328 T:5308 INFO : [script.logviewer] "GET /tail?offset=76729 HTTP/1.1" 200 - 2021-05-25 18:15:18.081 T:12272 INFO : CActiveAESink::OpenSink - initialize sink 2021-05-25 18:15:18.990 T:6932 INFO : initializing python engine. 2021-05-25 18:15:19.101 T:6932 WARNING : xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead. 2021-05-25 18:15:19.256 T:6932 ERROR : Skipped 1 duplicate messages.. 2021-05-25 18:15:19.256 T:6932 ERROR : C:\Users\M-C\AppData\Roaming\Kodi\addons\plugin.video.kodiconnect\resources\lib\fuzzywuzzy\fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')

2021-05-25 18:15:19.307 T:6932 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

tkislan commented 3 years ago

Ah thank you .. this should be easy to fix .. will let you know when the new version is available

BUGBEAR7 commented 3 years ago

Thanks Will be waiting of that :)

BUGBEAR7 commented 3 years ago

Hi mate Any update on this ?

tkislan commented 3 years ago

plugin.video.kodiconnect-0.3.1.zip

It should fix the above problem .. but there still might be other issues .. please let me know if you have some other error thrown

BUGBEAR7 commented 3 years ago

Thanks for the response

I installed it on a fresh new Kodi installation. It installed correctly , after that I putted my login details . A pop up appeared that it is connected I checked it at https://kodiconnect.kislan.sk/devices . It showed that device is connected but command of playing anything is not working though Alexa did said "Playing xxxxx in Kodi" but playback did not start . After a minute a two I got another pop up saying "Kodi Connect Disconnected" . I confirm this on webpage the previously connected device was not connected anymore.

I have only one error now in the log related to this plugin.video.kodiconnect

2021-05-29 13:09:36.930 T:2568 INFO : CPythonInvoker(6, C:\Users\M-C\AppData\Roaming\Kodi\addons\plugin.video.kodiconnect\service.py): script successfully run 2021-05-29 13:09:37.051 T:2568 INFO : Python interpreter interrupted by user 2021-05-29 13:09:39.520 T:6608 INFO : initializing python engine. 2021-05-29 13:09:39.597 T:6608 INFO : CPythonInvoker(37, C:\Users\M-C\AppData\Roaming\Kodi\addons\script.embuary.helper\default.py): script successfully run 2021-05-29 13:09:39.691 T:6608 INFO : Python interpreter stopped 2021-05-29 13:09:43.774 T:4840 INFO : initializing python engine. 2021-05-29 13:09:43.886 T:4840 WARNING : xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead. 2021-05-29 13:09:44.043 T:4840 ERROR : Skipped 1 duplicate messages.. 2021-05-29 13:09:44.043 T:4840 ERROR : C:\Users\M-C\AppData\Roaming\Kodi\addons\plugin.video.kodiconnect\resources\lib\fuzzywuzzy\fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')

I restarted the Kodi at start pop up appears as usual "Kodi Connect Connected" but after few minute another pop up comes saying it is disconnected . Same goes on webpage at Kodi startup the Connected is "Yes" but as the pop up appears in Kodi it goes to "No"

BUGBEAR7 commented 3 years ago

I also tested the older version on my Kodi Leia which is installed on a Mac, it is working fine as expected so setup to the Skill is correct. I guess there is something to be done in addon

BUGBEAR7 commented 3 years ago

Hello Have you checked it ?

tkislan commented 3 years ago

@BUGBEAR7 Yes, sorry for the late reply I actually can't figure out what might be wrong only from the portion you provided Would it be possible to try the same thing, and send the full kodi.log file?

BUGBEAR7 commented 3 years ago

Sure , I will send it today

flos06 commented 3 years ago

Any progress on this? Or do you still need a full log file tkislan? In which case I can try to provide one.

flos06 commented 3 years ago

So I've attached a logfile.

At first it says connected and then I try to give a command to watch a movie. In this case the father. Alexa replies with getting the father from kodi. Nothing happens however. At this point it states that kodi connect is still connected.

Manually starting a movie and trying 'alexa, pause' doesn't do anything either.

A few minutes later however kodi connect is no longer connected and in the log file it says connection closed as seen here:

Log: https://paste.ee/p/cH0g8

flos06 commented 3 years ago

Not to rush you but have you found the time to take a look? I would really love to get this working as it seems great :)

tkislan commented 3 years ago

Yes, thank you ... I did take a look at the logs, but nothing irregular there .. no error at all .. so that's why it's taking longer I will probably need to install it locally, and try what might be the problem

flos06 commented 3 years ago

Alright thanks for trying to figure it out

Motisu commented 3 years ago

Also waiting for a fix. This addon is the only reason that I an not upgrading to matrix. Good luck!

Marcagodbout commented 3 years ago

Hello tkislan,

Any update on the status of the addon?

First off thank you for this addon I have been using it for a long time now and love it, unfortunately I needed to upgrade all my kodi instances to 19 as well and was extremely sad when I found out they changed the python and kodi-connect stopped working, so THANK YOU for this add-on and taking the time to create and update it. I am very pleased to see you are getting it ready for 19.

I tried the install the zip you linked early in this post. As the others stated it connects initially but after a minute it just disconnects with no error. I ran it with logging turned on but not a single error coming from kodi-connect. It scans the library for a second or 2, than after 1 minute almost exactly it just closes: "DEBUG : [KodiConnect] Connection closed "

But like I said not a single error. I am not sure if this helps, but again thank you for the work you have done on this addon and I can not wait until the day you get it working with 19.

BUGBEAR7 commented 3 years ago

Hello tkislan

Sorry to bother you agin but is there any update on this ? I switched back to 18.9 just because of this addon . So that is why I was unable to give the Kodi 19 log. But I guess you got the log

We are waiting for this

Thanks

tkislan commented 3 years ago

I apologise, that I've still haven't been able to get to this .. but I do have it in my TODO list, as I also plan to upgrade my device to Kodi 19 aswell

flos06 commented 3 years ago

Have you upgraded your device yet?

tkislan commented 3 years ago

plugin.video.kodiconnect-0.3.3.zip

Can you please try this version?

It is working on my Kodi box, but just want to confirm, that it works for others as well

Motisu commented 3 years ago

Works just fine! Thank you for the effort!

Motisu commented 3 years ago

Major problem. I have 2 Kodi platforms, 1 is a kodi box running Coreelec and the second is an intel NUC running Libreelec. both are running Kodi Matrix and both are registered at the connect site. The new 3.3 version runs well on the Coreelec box, but I get an error the second that I start it on the Libreelec box. Can you please look into this?

tkislan commented 3 years ago

@Motisu Can you please share kodi debug log so that I can try to resolve the issue

Motisu commented 3 years ago

sure. here it is kodi.log .

tkislan commented 3 years ago

@Motisu Can you give this version a try? https://kodi-connect.s3.eu-central-1.amazonaws.com/kodi-connect-addon/3.0.0/plugin.video.kodiconnect-0.3.4.zip

Motisu commented 3 years ago

sorry,but it didnt work. I uninstalled the old version and installed the new one. same problem. Here is an upload of the relavant part of the log kodi.log :

tkislan commented 3 years ago

@Motisu I'm fairly confident, that this version should fix it https://kodi-connect.s3.eu-central-1.amazonaws.com/kodi-connect-addon/3.0.0/plugin.video.kodiconnect-0.3.5.zip

Motisu commented 3 years ago

@tkislan Sorry it took so long to test & get back to you. It still throws an error right after starting. Here is the new log kodi.log .

flos06 commented 3 years ago

Hi thanks for updating the addon. While it now stays connected it doesnt actually do anything with the commands. Alexa, pause for example doesnt do anything while alexa watch movie interstellar gives the output from alexa: Getting interstellar from kodi. However nothing happens. Any ideas?

tkislan commented 3 years ago

@flos06 some debug logs from kodi would be useful if I am to help you

flos06 commented 3 years ago

I think the issue had to do with some of my previous tries. I've deleted everything and started from scratch. Works wonders now! Thanks for the update I love it!

Motisu commented 3 years ago

@tkislan were my latest logs useful? are you missing anything that I can help with?

Marcagodbout commented 3 years ago

neither of these worked for me, I am not able to get it connected, it just throws an error. One thing I did not do is rebuild the alexa skill. Would I need to start that from scratch too, or should it work with this build?

tkislan commented 3 years ago

@Marcagodbout no, it is enough to just update the addon If it throws error, can you please share a debug kodi log file?

BUGBEAR7 commented 3 years ago

Hello tkislan

I have installed fresh Kodi 19.1 , tested 0.3.3, 0.3.4, and 0.3.5 None of the version worked . It gives error just after installation.
log 0.3.5.txt log 0.3.3.txt log 0.3.4.txt

Please take a look

Marcagodbout commented 3 years ago

I am getting the exact same error as BUGBEAR7's logs.

BUGBEAR7 commented 3 years ago

Hello Any update on this ?

Kodialexalover commented 3 years ago

plugin.video.kodiconnect-0.3.3.zip

Can you please try this version?

It is working on my Kodi box, but just want to confirm, that it works for others as well

"plugin.video.kodiconnect-0.3.3.zip" İt's working in kodi 19.3 version, thank you man :) (Xiaomi mi tv stick 1080p)

But I don't know why, these did not work in windows 11 kodi 19.3 version

log 0.3.5.txt

log 0.3.3.txt

log 0.3.1.txt

log 0.3.4.txt

bamcdowal commented 2 years ago

@tkislan were my latest logs useful? are you missing anything that I can help with?

@Motisu I'm having this same issue - Libreelec 10. My logs look the same as yours - did you have any luck getting this to work? @tkislan is this something that you are still working on? Thanks for your efforts so far.

LuKePicci commented 2 years ago

Same here, kodi win10, did try 0.3.3 only. It looks related to https://stackoverflow.com/questions/60359157/valueerror-set-wakeup-fd-only-works-in-main-thread-on-windows-on-python-3-8-wit

tkislan commented 2 years ago

@LuKePicci Thank you for the pointer I was starting to worry, that I would need to completely reimplement the addon

I've added the workaround into the new version, can you please give it a try? plugin.video.kodiconnect-0.3.4.zip

LuKePicci commented 2 years ago

I will try in a few hours, I was trying to determine the actual version of python in Kodi UWP to see if it really is less then 3.8.2 but I can't find it anywhere in the logs.

LuKePicci commented 2 years ago

Latest 0.3.4 works GJ

Now I have to figure why "Alexa, go to channel number" doesn't work, but that's another story. Thank you for the quick fix.

tkislan commented 2 years ago

@LuKePicci Channel controls are not implemented I had no way to test it, so I never got to implement it

LuKePicci commented 2 years ago

I would be happy to be a tester if you like.

Motisu commented 2 years ago

Hi Tomas, I tried the new version but unfortunately, it still crashes. Here is an edited log of the crash. BTW, I also use channel PVR so if you need another tester, I'd be very happy to volunteer kodi.log .

BUGBEAR7 commented 2 years ago

@LuKePicci What version of Kodi are you using and the type of installation I mean in which os you are using it ?

LuKePicci commented 2 years ago

@BUGBEAR7 Win10 x64 21H2 on a GBox (Celeron N4100) with Kodi 19.3 from the Store. It is using the builtin python interpreter, not the one installed into the OS.

My issue was the same as in @Kodialexalover and @BUGBEAR7 logs, and I confirm it was related to the bug of python 2.8.0/2.8.1 for windows - see stack overflow link above.