warwickh / plugin.audio.subsonic

Kodi plugin to stream music from Subsonic.
MIT License
62 stars 13 forks source link

dateutil could not be imported + "connection error" #5

Closed ch604 closed 3 years ago

ch604 commented 7 years ago

i originally got an error on startup, and the log indicated that dateutil could not be imported; a quick apt-get install python-dateutil fixed that. but now, the plugin says "connection error" and im receiving this in the logs:

22:09:34 T:140208712439552   DEBUG: CPythonInvoker(3, /home/xbmc/.kodi/addons/pl
ugin.audio.subsonic/main.py): entering source directory /home/xbmc/.kodi/addons/
plugin.audio.subsonic
22:09:34 T:140208712439552   DEBUG: CPythonInvoker(3, /home/xbmc/.kodi/addons/pl
ugin.audio.subsonic/main.py): instantiating addon using automatically obtained i
d of "plugin.audio.subsonic" dependent on version 2.14.0 of the xbmc.python api
22:09:34 T:140208712439552   DEBUG: plugin.audio.subsonic: <Plugin ['plugin://plugin.audio.subsonic/', '1', '']>
22:09:34 T:140208712439552   DEBUG: plugin.audio.subsonic: Actions: ['list_artists', 'list_tracks', 'list_playlists', 'download_item', 'play_track', 'star_item', 'list_albums', 'menu_tracks', 'root', 'menu_albums']
22:09:34 T:140208712439552   DEBUG: plugin.audio.subsonic: Called action "root" with params "<Params {}>"
22:09:35 T:140208712439552   DEBUG: plugin.audio.subsonic: Action return value: None
22:09:35 T:140208712439552   DEBUG: plugin.audio.subsonic: The action "root" has not returned any valid data to process.
22:09:35 T:140208712439552    INFO: CPythonInvoker(3, /home/xbmc/.kodi/addons/plugin.audio.subsonic/main.py): script successfully run
22:09:35 T:140208712439552    INFO: Python script stopped
22:09:35 T:140208712439552   DEBUG: Thread LanguageInvoker 140208712439552 terminating
22:09:35 T:140208704046848   DEBUG:  WaitOnScriptResult - plugin exited prematurely - terminating
22:09:35 T:140210960373760   ERROR: GetDirectory - Error getting plugin://plugin.audio.subsonic/

i should also note that i originally had basilfx's plugin installed, which i removed from kodi before adding your repo, so the old settings file may be in use. not sure if that matters to this alternate version...

gordielachance commented 7 years ago

It is weird you had ton install python-dateutil manually since it is declared as dependency in the plugin's addon.xml... The "connection error" message appears when no internet connection is detected, are u sure you had this when you were connected ?

There should be no conflicts updating from basilfx's versions (this is what I did myself).

Also and probably the most important : what is your OS, plugin and Kodi versions ?

langtall commented 7 years ago

Also got the ImportError on the dateutil.parser, running a fresh OpenElec 6.0.3 om an Pi3.

philvt101 commented 7 years ago

I'm getting the same error on Win7. Installed dateutil with pip install python-dateutil which completes successfully but I still get the same fault.

ch604 commented 7 years ago

I believe I may have tracked down the error; tomcat stopped on my server somehow, meaning that subsonic was inaccessible! ill retry once i get home.

the client is running latest kodi on xubuntu 16.04

the server should be agnostic, but tomcat 7 and centos 6.

JimGilliland commented 7 years ago

I had to manually install dateutil as well. Once that was completed, everything worked.

gordielachance commented 7 years ago

What is your Kodi version please ?

langtall commented 7 years ago

OpenElec 6.0.3 uses Kodi 15.2

gordielachance commented 7 years ago

Okay; Let's see if it still occurs with Kodi 17... I would like to avoid to fix this for old Kodi versions :)

langtall commented 7 years ago

I just updated to OpenElec 7.0.0 with Kodi 16.1 final. Starting the subsonic plugin brings the following error:

21:46:50 75.599861 T:1963991040 ERROR: GetDirectory - Error getting plugin://plugin.audio.subsonic/ 21:46:50 75.600136 T:1963991040 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.subsonic/) failed 21:46:57 82.932899 T:1534055328 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: No module named six Traceback (most recent call last): File "/storage/.kodi/addons/plugin.audio.subsonic/main.py", line 15, in import dateutil.parser File "/storage/.kodi/addons/script.module.dateutil/lib/dateutil/parser.py", line 40, in from six import text_type, binary_type, integer_types ImportError: No module named six -->End of Python script error report<--

I'm afraid it will take ages before OpenElec switches to Kodi 17, as this is the a very recent update. :-/

philvt101 commented 7 years ago

I'm running the latest version of Jarvis. I had been installing the plugin by dropping it in the add on folder and I would get the dateutil error.  When I installed from zip everything worked just fine. 

langtall commented 7 years ago

Got it!

After lots of searching, I found http://mirrors.kodi.tv/addons/jarvis/script.module.six/ and installed it manually. It now works. Now how to point it to my own server. :-)

gordielachance commented 7 years ago

The dateutil dependency author says that

That's a known problem of the krypton beta. So please wait for the next beta or final. Or install this from zip file.

So I guess this is not related to the Subsonic plugin.

andrelx commented 7 years ago

I've been using a previous version of the plugin by Basilfx for some time and am trying to upgrade ...

I have installed the plugin as directed (Navigate to your .kodi/addons/ folder | Clone this repository: git clone https://github.com/gordielachance/plugin.audio.subsonic.git | (Re)start Kodi.) and I had the "dateutil could not be imported" error.

After a lot of trial and error, I've decided to install the plugin in a more traditional way, using KODI interface and "install from ZIP file". Bingo !! It does not give me this error anymore! Please correct the installation directions for the next users!

But now, I'm getting a "Connection error!". Any info I should provide to you to get help ?

BTW - I love this plugin! Thanks,

André

andrelx commented 7 years ago

I found the problem !!

In my addon configuration, the Server Url is : "http://MyServeName:7080/subsonic". In the file libsonic/connection.py, I found this:

class Connection(object):
    def __init__(self, baseUrl, username=None, password=None, port=4040,
            serverPath='/subsonic/rest', appName='py-sonic', apiVersion=API_VERSION,
            insecure=False, useNetrc=None, legacyAuth=False, useGET=False):

The path that is in the configuration is not used, and is simply replaced by "/rest". "/rest" should be ADDED to the path in the configuration, if present. I've made a small patch by hard-coding my path, and everything works flawlessly. My programming skills are quite limited in Python, so I'll let you make the correction.

Merci, et ne lâchez-pas !!!

André

gordielachance commented 6 years ago

Hi, it's not yet merged; but could you try the 2.0.8 branch and tell me if it works for u ? https://github.com/gordielachance/plugin.audio.subsonic/tree/2.0.8 Thanks !

JimGilliland commented 6 years ago

Hi, Gordie! I will try to get some testing done. At the moment, I'm not even sure that I have a Kodi system running. It shouldn't be too hard to get one set up, though. It looks like a busy weekend, so it may be a few days.

Did you try testing it with my Subsonic library? The credentials that I gave you should still work.

Jim

On Fri, Dec 1, 2017 at 5:55 PM, gordielachance notifications@github.com wrote:

Hi, it's not yet merged; but could you try the 2.0.8 branch and tell me if it works for u ? https://github.com/gordielachance/plugin.audio.subsonic/tree/2.0.8 Thanks !

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gordielachance/plugin.audio.subsonic/issues/5#issuecomment-348635980, or mute the thread https://github.com/notifications/unsubscribe-auth/AXrprVlMisP7N2qgIyBAFkflNLTml6cLks5s8IPVgaJpZM4KeB1f .

Phyks commented 6 years ago

Same issue here with the instructions from the README. apt-get install python-dateutil worked though!

Thanks for the work on this nice addon!

Harteex commented 5 years ago

The instructions in the readme are wrong. If you simply download the latest release from GitHub and then in Kodi select Install from zip, it will automatically install the required dependencies (dateutil).

Simply copying the folder to addons will not work, unless you install dateutil manually.

warwickh commented 3 years ago

Closing this issue. The comment above is still valid for some versions.

**The instructions in the readme are wrong. If you simply download the latest release from GitHub and then in Kodi select Install from zip, it will automatically install the required dependencies (dateutil).

Simply copying the folder to addons will not work, unless you install dateutil manually.**