Giter VIP home page Giter VIP logo

Comments (7)

chrisgo67 avatar chrisgo67 commented on June 30, 2024 1

I have it up and running on the nighly from 20230210.
Had to go through some log errors and patch the referenced lines in the .py files.

From top of my head:

In outh2.py:

    response = requests.post(self.OAUTH_TOKEN_URL, data=payload,
        headers=headers, verify=True, proxies=self.proxies)
    if response.status_code != 200:

(last line was if response.status.code is not 200 before)

In /storage/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cpdispatch.py :

else:
getargspec = inspect.getfullargspec(callable)[:4]
# Python 3 requires using getfullargspec if
# keyword-only arguments are present
if hasattr(inspect, 'getfullargspec'):
def getargspec(callable):
return inspect.getfullargspec(callable)[:4]

(First line was: getargspec = getargspec(callable): before) (Not qiet clean hack - i know!)

from plugin.audio.spotify.

RolandFelnhofer avatar RolandFelnhofer commented on June 30, 2024 1

replacing line 209 of plugin.audio.spotify/resources/lib/cherrypy/_cpdispatch.py
- getargspec = inspect.getargspec(callable)[:4]
+ getargspec = inspect.getfullargspec(callable)[:4]

worked for me!

... a bit 'nicer' version:

--- _cpdispatch.py.ORI  2023-06-11 20:44:30.642732832 +0200
+++ _cpdispatch.py      2023-06-11 20:44:39.854773002 +0200
@@ -206,12 +206,13 @@
     def test_callable_spec(callable, args, kwargs):  # noqa: F811
         return None
 else:
-    getargspec = inspect.getargspec(callable)[:4]
     # Python 3 requires using getfullargspec if
     # keyword-only arguments are present
     if hasattr(inspect, 'getfullargspec'):
-        def getargspec(callable):
-            return inspect.getfullargspec(callable)[:4]
+        getargspec = inspect.getfullargspec(callable)[:4]
+    else:
+        getargspec = inspect.getargspec(callable)[:4]

from plugin.audio.spotify.

jobass44 avatar jobass44 commented on June 30, 2024

Same issue for me.
LibreELEC 11 with Kodi 20.0 on RPI 4.

Error appears after installation plugin.audio.spotify-1.2.3.zip through Kodi.
The plugin ask for web browser when launched and Spotify Android App do not see at all Kodi.

A fix would be great.

from plugin.audio.spotify.

jobass44 avatar jobass44 commented on June 30, 2024

Hi BlablaBloblo

I downloded te ZIP file on your branch here : https://github.com/BlablaBloblo/plugin.audio.spotify/tree/nexus
When I install it through Kodi (install from a zip file), Kodi says Spotify plugin installed successfully but immediatly an error occurs. Here is the log file to help you :

2023-03-12 17:47:20.032 T:31485 error : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'AttributeError'>
Error Contents: module 'inspect' has no attribute 'getargspec'
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.audio.spotify/service.py", line 13, in
from main_service import MainService
File "/storage/.kodi/addons/plugin.audio.spotify/resources/lib/main_service.py", line 14, in
from httpproxy import ProxyRunner
File "/storage/.kodi/addons/plugin.audio.spotify/resources/lib/httpproxy.py", line 4, in
import cherrypy
File "/storage/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/init.py", line 71, in
from . import _cpdispatch as dispatch
File "/storage/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cpdispatch.py", line 209, in
getargspec = inspect.getargspec(callable)[:4]
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
-->End of Python script error report<--

After that, when I try to launch Spotify plugin, it still says "The default browser should not be open, follows the directions to authorize this app on Spotify".
I d'oint know if it's normal, there's no browser on Librelec, or I am missing something.
Do you have this behaviour ?

Anyway, I can't manage to have the plugin working well because of the error during install.
Any idea ?

Thanks for you response and I can test your commits whenever you want.
It would be fantastic to make running Spotify on LE 11 and Kodi 20.

from plugin.audio.spotify.

jcjdammers avatar jcjdammers commented on June 30, 2024

Is there a fix already?
Please let me know, thanks.

from plugin.audio.spotify.

chrisgo67 avatar chrisgo67 commented on June 30, 2024

I can only say that it runs quiet fine with the above mentioned changes on my side.
The qad fix is not really clean I know. But I am not an addon developer.

from plugin.audio.spotify.

RolandFelnhofer avatar RolandFelnhofer commented on June 30, 2024

getargspec = inspect.getargspec(callable)[:4]
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'

Same for me!

I'm using it with Libreelec 11.0.1. It uses Python 3.11.2
Python versions > 3.7 do not support 'inspect.getargspec'.

Anyone here knows how to replace this function with one running under python 3.11.x?

from plugin.audio.spotify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.