Jump to content

v2.2.23 - (ImportError: cannot import name ServerConnect)


VladTepz
Go to solution Solved by Angelblue05,

Recommended Posts

VladTepz

Updated 5 of my Kodi boxes(LibreElec & Ubuntu 16.04) to 2.2.23 successfully but my main HTPC (Ubuntu 16.04) is having this issue.

11:29:34 T:139867556148992   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: cannot import name ServerConnect
                                            Traceback (most recent call last):
                                              File "/home/mike/.kodi/addons/plugin.video.emby/service.py", line 23, in <module>
                                                import userclient
                                              File "/home/mike/.kodi/addons/plugin.video.emby/resources/lib/userclient.py", line 12, in <module>
                                                import connectmanager
                                              File "/home/mike/.kodi/addons/plugin.video.emby/resources/lib/connectmanager.py", line 13, in <module>
                                                from dialog import ServerConnect, UsersConnect, LoginConnect, LoginManual, ServerManual
                                            ImportError: cannot import name ServerConnect
                                            -->End of Python script error report<--

 I even renamed my .kodi folder & restarted kodi as a fresh install.

 

Attached is the full log, let me know if you need any other info. :)

kodi.log

Edited by VladTepz
Link to comment
Share on other sites

Angelblue05

This should be resolved with the next beta version. I'll be releasing it in a few hours or sooner. Thanks!

Edited by Angelblue05
Link to comment
Share on other sites

VladTepz

Unfortunately, the problem still persists in v2.2.25 with the same error.

 

I think that this may be a special case as my other Ubuntu 16.04 install, v2.2.23 worked as expected.

The Ubuntu 16.04 I'm having issues with is also a production machine running other python 2 & python 3 apps, though most in their own virtual environments.

 

 

I was able to fix the issue though,

 

Strangely, By renaming "plugin.video.emby/resources/lib/dialog" to "plugin.video.emby/resources/lib/dialog2" and modifying "plugin.video.emby/resources/lib/connectmanager.py"

from dialog.serverconnect import ServerConnect
from dialog.usersconnect import UsersConnect
from dialog.loginconnect import LoginConnect
from dialog.loginmanual import LoginManual
from dialog.servermanual import ServerManual

To:

from dialog2.serverconnect import ServerConnect
from dialog2.usersconnect import UsersConnect
from dialog2.loginconnect import LoginConnect
from dialog2.loginmanual import LoginManual
from dialog2.servermanual import ServerManual

Everything works as expected. :)

 

Not sure why though, as my python-fu is still at the novice level. ;)

 

If you need any help tracking down why there is an issue in this special case, I am more than willing to help. :)

 

Thanks.

Link to comment
Share on other sites

Angelblue05

Ok... I'm not sure why it would give difficulty with the naming unless it's possibly conflicting?

 

Can you test the following then: do you still have 2.2.23? If so, let me know if simply renaming the dialog folder to something else works then. If it does, I'll revert my latest modification and simply rename the folder to something else, thanks.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

VladTepz

v2.2.23 works as expected by renaming dialog to dialog2 and modifying connectmanager.py.

from dialog2 import ServerConnect, UsersConnect, LoginConnect, LoginManual, ServerManual
  • Like 1
Link to comment
Share on other sites

  • Solution
Angelblue05

Ok, well I reverted my latest change to try and fix this. If I had to assume, you probably have a dialog module somewhere in your python system path that conflicts when we import using the same name.

 

Anyway, I've renamed the folder to dialogs. It will be added to the next beta version, so please let me know then, if the issue is still resolved. Thanks

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...