[RELEASE] CouchPotato Manager Add-on
#76
Anyone been able to get add on working? Trying to use in the new MQ 6 with no luck.
Reply
#77
Still haven't gotten plugin to work.

Here is the log:

Code:
05:57:52 T:8084  NOTICE: -->Python Interpreter Initialized<--
05:57:52 T:8084  NOTICE: [CouchPotatoApi]: u'connect: hostname="http://10.0.1.101" port="5050" use_https="False" username="" api_key="True" url_base="couchpotato"'
05:57:52 T:8084  NOTICE: [CouchPotatoApi]: 'trying api_key...'
05:57:52 T:8084  NOTICE: [CouchPotatoApi]: '_api_call started with endpoint=app.available, params=None'
05:57:54 T:8084   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'urllib2.URLError'>
                                            Error Contents: <urlopen error [Errno 11001] getaddrinfo failed>
                                            Traceback (most recent call last):
                                              File "C:\Users\Ray\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 446, in <module>
                                                api = get_api()
                                              File "C:\Users\Ray\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 405, in get_api
                                                ba_password=plugin.get_setting('ba_password', unicode),
                                              File "C:\Users\Ray\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 73, in connect
                                                json_data = self._api_call('app.available')
                                              File "C:\Users\Ray\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 165, in _api_call
                                                raw = urlopen(self._request(url)).read()
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 127, in urlopen
                                                return _opener.open(url, data, timeout)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 404, in open
                                                response = self._open(req, data)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 422, in _open
                                                '_open', req)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 382, in _call_chain
                                                result = func(*args)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 1214, in http_open
                                                return self.do_open(httplib.HTTPConnection, req)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 1184, in do_open
                                                raise URLError(err)
                                            URLError: <urlopen error [Errno 11001] getaddrinfo failed>
                                            -->End of Python script error report<--
05:57:54 T:3032   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.couchpotato_manager/?content_type=executable
05:57:54 T:3032   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.couchpotato_manager/?content_type=executable) failed
Reply
#78
I am having the same error (message) as everybody else. Just wanted to say that any help would be greatly appreciated! Smile

/edit: For good measure, here is the output:
From the cp manager log:
Code:
20:57:50 T:140101866731264   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: ('_id',)
                                            Traceback (most recent call last):
                                              File "/home/xbmc/.kodi/addons/plugin.video.couchpotato_manager/addon.py", line 448, in <module>
                                                plugin.run()
                                              File "/home/xbmc/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 332, in run
                                                items = self._dispatch(self.request.path)
                                              File "/home/xbmc/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 306, in _dispatch
                                                listitems = view_func(**items)
                                              File "/home/xbmc/.kodi/addons/plugin.video.couchpotato_manager/addon.py", line 209, in add_new_wanted
                                                profile_id = ask_profile()
                                              File "/home/xbmc/.kodi/addons/plugin.video.couchpotato_manager/addon.py", line 241, in ask_profile
                                                profile_id = selected_profile['_id']
                                            KeyError: ('_id',)
                                            -->End of Python script error report<-

And here is the couchpotato log:
Code:
02-15 21:01:43 ERROR ^[[31mException on /api/709e8dca01c84d2b9da1057c5699252a/dashboard.soon/ [GET]^[[0m
Traceback (most recent call last):
  File "/home/xbmc/.couchpotato/libs/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/xbmc/.couchpotato/libs/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/xbmc/.couchpotato/libs/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/xbmc/.couchpotato/libs/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/xbmc/.couchpotato/couchpotato/core/plugins/dashboard/main.py", line 101, in getSoonView
    pp = profile_pre.get(movie.profile.id)
AttributeError: 'NoneType' object has no attribute 'id'

The SOLUTION to my problem was, to change line 241 in .kodi/addons/plugin.video.couchpotato_manager/addon.py from
Code:
profile_id = selected_profile['id']
to
Code:
profile_id = selected_profile['_id']
Basically you just delete the underscore.
Reply
#79
I proposed my change on github and also @therealpxc's change (because without it it doesn't work, at least on my setup). I hope you don't mind.
Reply
#80
Just installed this on kodi, how do I set up username and password
Reply
#81
Sadly this addon has stopped working for me also

Code:
22:09:19 T:7956  NOTICE: [CouchPotatoApi]: u'connect: hostname="192.168.1.22" port="5050" use_https="False" username="admin" api_key="True" url_base=""'
22:09:19 T:7956  NOTICE: [CouchPotatoApi]: 'trying api_key...'
22:09:19 T:7956  NOTICE: [CouchPotatoApi]: '_api_call started with endpoint=app.available, params=None'
22:09:21 T:7956   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: No JSON object could be decoded
                                            Traceback (most recent call last):
                                              File "C:\Users\Ash\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 446, in <module>
                                                api = get_api()
                                              File "C:\Users\Ash\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 405, in get_api
                                                ba_password=plugin.get_setting('ba_password', unicode),
                                              File "C:\Users\Ash\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 73, in connect
                                                json_data = self._api_call('app.available')
                                              File "C:\Users\Ash\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 167, in _api_call
                                                json_data = json.loads(raw)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\json\__init__.py", line 338, in loads
                                                return _default_decoder.decode(s)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\json\decoder.py", line 366, in decode
                                                obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\json\decoder.py", line 384, in raw_decode
                                                raise ValueError("No JSON object could be decoded")
                                            ValueError: No JSON object could be decoded
                                            -->End of Python script error report<--
22:09:21 T:8064   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.couchpotato_manager/
22:09:21 T:8064   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.couchpotato_manager/) failed
Reply
#82
I got exact same problem. Same Log error. Anyone know how to fix this?
Image
the OldSkool Generation Gap
Reply
#83
Somebody should mark this add-on as broken on Jarvis. I get the same errors as everyone else. Kiesel's fix above did not work for me.

Sad Angel Sad
Image
Reply
#84
I confirm that this addon works (at least on linux) if you remove the mentioned underscore as explained in post #78. I just installed a fresh couchpotato version and after trying to update this plugin I had the keyerror problem and I was able to fix it as described.
Reply
#85
Thank you Kiesel,

I just tried a clean install of the addon. My CP is on a separate machine within my network. I made the edit to file on post #81. When I try to launch CP Manager, I get the following error:

Code:
10:32:15 T:10492   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
         - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
        Error Type: <type 'exceptions.ValueError'>
        Error Contents: No JSON object could be decoded
        Traceback (most recent call last):
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 446, in <module>
            api = get_api()
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 405, in get_api
            ba_password=plugin.get_setting('ba_password', unicode),
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 73, in connect
            json_data = self._api_call('app.available')
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 167, in _api_call
            json_data = json.loads(raw)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\json\__init__.py", line 338, in loads
            return _default_decoder.decode(s)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\json\decoder.py", line 366, in decode
            obj, end = self.raw_decode(s, idx=_w(s, 0).end())
          File "C:\Program Files (x86)\Kodi\system\python\Lib\json\decoder.py", line 384, in raw_decode
            raise ValueError("No JSON object could be decoded")
        ValueError: No JSON object could be decoded
        -->End of Python script error report<--
10:32:15 T:11024   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.couchpotato_manager/?content_type=executable
10:32:15 T:11024   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.couchpotato_manager/?content_type=executable) failed

- I do not have a username/password set in CP.
- I added the CP API key to the CP Manager settings.
- For "host name" I use the internal IP for CP and its correct port.
- For "Set default profile" I leave blank

Image

Image

Image

Image

For "URL Base" The above error code is what I get when left blank. When I set "URL Base" to "/couch", which is how my reverse proxy is set up, I get the below error:

Code:
10:42:51 T:10296   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
         - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
        Error Type: <class 'urllib2.URLError'>
        Error Contents: <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>
        Traceback (most recent call last):
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 446, in <module>
            api = get_api()
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\addon.py", line 405, in get_api
            ba_password=plugin.get_setting('ba_password', unicode),
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 73, in connect
            json_data = self._api_call('app.available')
          File "C:\Users\HernandoSSD\AppData\Roaming\Kodi\addons\plugin.video.couchpotato_manager\resources\lib\api.py", line 165, in _api_call
            raw = urlopen(self._request(url)).read()
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 127, in urlopen
            return _opener.open(url, data, timeout)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 410, in open
            response = meth(req, response)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 523, in http_response
            'http', request, response, code, msg, hdrs)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 442, in error
            result = self._call_chain(*args)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 382, in _call_chain
            result = func(*args)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 629, in http_error_302
            return self.parent.open(new, timeout=req.timeout)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 410, in open
            response = meth(req, response)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 523, in http_response
            'http', request, response, code, msg, hdrs)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 442, in error
            result = self._call_chain(*args)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 382, in _call_chain
            result = func(*args)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 629, in http_error_302
            return self.parent.open(new, timeout=req.timeout)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 404, in open
            response = self._open(req, data)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 422, in _open
            '_open', req)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 382, in _call_chain
            result = func(*args)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 1214, in http_open
            return self.do_open(httplib.HTTPConnection, req)
          File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 1184, in do_open
            raise URLError(err)
        URLError: <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>
        -->End of Python script error report<--
10:42:51 T:10728   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.couchpotato_manager/?content_type=executable
10:42:51 T:10728   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.couchpotato_manager/?content_type=executable) failed

This is on my test Windows machine. My working machines are running LibreELEC and I get errors on these as well.

I feel like I am close. Any advise is greatly appreciated.

Thanks again,

H.
Image
Reply
#86
For those interested in.
I fixed the addon.py script.
You can download it here

I'm opened to your feedback since i never used the addon before, so not really aware of what is working and what is not.

I would have liked the addon to add a couchpotato option directly in movies library but it does not looks like working that way.

Except if I missed something
Reply
#87
I though I seen somewhere there was a way to add "Add to Couchpotato" from the Contextual menu when browsing other addons. If so point me to that location
Reply
#88
Thank you so much for this addon, it has done awesome things for me! I recently updated to 17.3 Krypton. I now have lost what I considered to be the greatest feature of this addon in the process. Before with 16, when I hit enter on a cast member it gave me the options of : "List local items with this actor" or "lookup actor on TMDB" the latter of which would display all titles with this cast member in it. I was then able to click on a movie and it would add it to couchpotato. Now when I click on a cast member I no longer get any options and it takes me straight to viewing only local items. Is there anything I can do? Thanks again very much!
Reply
#89
Does anyone know of a tweak to CouchPotato that enables it to automatically create a Poster.jpg for movies it renames?

The Kodi metadata settings don't create poster.jpg

Or are there any other tools I can use to monitor a directory and automatically rename/create-metadata suitable for Kodi?

Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] CouchPotato Manager Add-on2