• 1
  • 7
  • 8
  • 9
  • 10
  • 11(current)
[Release] Common plugin cache
add
PHP Code:
print "------------------------------------------------"
print self.socket 

before line 263 in StorageServer.py file.
Make sure you add it correctly inline with the rest and only use spaces for the indent else it fails.

The -------------- is to easily find the printed value.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
Ok, is it this way?

PHP Code:
# self.conn.close()
        
if self._usePosixSockets():
            print 
"------------------------------------------------"
            
print self.socket
            
if self.xbmcvfs.exists(self.socket):
                
self._log("Deleting socket file")
                
self.xbmcvfs.delete(self.socket)
        print 
self.plugin " Closed down" 
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
yep that should at least print whatever value is in it. From that we can try to fix it
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
Here it is...

http://www.mediafire.com/download/f2erav...282%29.log

...this is with the new version of TvTunes that works well again.
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
can't you use xbmclogs.com ?
Also make sure you don't run scanning and whatever at start
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
(2016-02-23, 13:00)manfeed Wrote: Here it is...

http://www.mediafire.com/download/f2erav...282%29.log

...this is with the new version of TvTunes that works well again.

You may want to turn TvTunes logging off now Smile
Reply
problem is here:
Code:
if self._usePosixSockets():

this should return false on windows systems.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
Ok... learning new things on the way... Nod

http://goo.gl/4P3sF9
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
Hrm, just wondering, but shouldn't this be a module?
Reply
First thanksinadvance for your helping.I´ll explain my problem.Android box mygica 1600atv version 4.4.2, xbmc gotham 13.2, since the day before yesterday, i cant update the common plugin addon( dependencies not met addon broken etc,etc).Itried force refresh, after that.reboot , etc.Impossible.I hadnt any problem before, with the addon or others ( kodi officials or not ) in last 2 years.By the way this version of xbmc came integrated with the android box, works perfect, with the most of addons, till now( a few ones in some repos said me npow "imcompatibles", for the problem with the common addon)Can you help me ?
Reply
(2016-02-23, 11:20)robwebset Wrote: Hi,

I have just been looking at a log to solve an issue with TvTunes and spotted an error from script.common.plugin.cache

http://forum.kodi.tv/showthread.php?tid=...pid2255282

so thought I would post it here in case it's of any use

Code:
08:45:29 T:4796   ERROR: EXCEPTION: argument "path" for method "XBMCAddon::xbmcvfs::exists" must be unicode or str
08:45:29 T:4796   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: argument "path" for method "XBMCAddon::xbmcvfs::exists" must be unicode or str
                                            Traceback (most recent call last):
                                              File "C:\Users\Manuel Fuentes\AppData\Roaming\Kodi\addons\script.common.plugin.cache\default.py", line 40, in <module>
                                                run()
                                              File "C:\Users\Manuel Fuentes\AppData\Roaming\Kodi\addons\script.common.plugin.cache\default.py", line 35, in run
                                                s.run()
                                              File "C:\Users\Manuel Fuentes\AppData\Roaming\Kodi\addons\script.common.plugin.cache/lib\StorageServer.py", line 263, in run
                                                if self.xbmcvfs.exists(self.socket):
                                            TypeError: argument "path" for method "XBMCAddon::xbmcvfs::exists" must be unicode or str
                                            -->End of Python script error report<--

Thanks

Rob
Same issue / message with Kodi 15.2 / Windows 7 32 bits.

I have downloaded 2.5.8 release from Jarvis repo (as Isengard repo provide only 2.5.6) and the error is gone.
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
just fyi, there is an erroneous leading space one line 33 in script.common.plugin.cache\default.py
space before "StorageServer Module loaded RUN"

Code:
21:16:27.145 T:6584   DEBUG:  StorageServer Module loaded RUN
21:16:27.145 T:6584   DEBUG: StorageClient-2.5.4 Starting server
Reply
I'm trying to implement this into my plugin, but I'm having trouble understanding how it should work.  Here's my simple test:
python:

import StorageServer
cache = StorageServer.StorageServer('IARL_Test', 24) # (Your plugin name, Cache time in hours)

test1 = IARL.get_games_as_listitems(game_list_id)  #Grabs some xbmcgui listitem objects
print 'test1'
print len(test1)
print test1
cache.set('test1',test1)

print 'test2'
test2= cache.get('test1')
print len(test2)
print test2


This returns:
xml:

...
14:29:16.553 T:123145308819456   DEBUG: test1
14:29:16.553 T:123145308819456   DEBUG: 50
14:29:16.553 T:123145308819456   DEBUG: [<kodi_six.utils.wrapped_class_ListItem object at 0x7fc18b6d0370>
...
<kodi_six.utils.wrapped_class_ListItem object at 0x7fc18b9f50c0>]

14:29:18.767 T:123145308819456   DEBUG: test2
14:29:18.786 T:140735301029888   DEBUG:   -- items: 50, sort method: 0, ascending: false
14:29:18.793 T:123145308819456   DEBUG: 0

It doesn't appear to cache the listitem objects and returns nothing.  Is that a limitation of this, or am I implementing it incorrectly?

Edit, after turning on debugging for the plugin cache script i see that it can't evaluate this type of object, back to the drawing board for me...

xml:

NOTICE: [StorageServer-2.5.4] '_recieveData' : 'Couldn't evaluate message : "{'action': 'set', 'table': ...
Reply
Please update this module for python3 support
I use this excellent module on a couple of my addons and am unable to convert my addons to py3 as they depend on this shared module

Thanks
Kodi 21 Windows 10 and 11 | 21 Xbox One X | 21 Linux Mint Virginia XFCE | CoreELEC NO 21 nightly S905X4 aarch64
Reply
(2018-03-07, 00:34)zachmorris Wrote: I'm trying to implement this into my plugin, but I'm having trouble understanding how it should work.  Here's my simple test:
python:

import StorageServer
cache = StorageServer.StorageServer('IARL_Test', 24) # (Your plugin name, Cache time in hours)

test1 = IARL.get_games_as_listitems(game_list_id)  #Grabs some xbmcgui listitem objects
print 'test1'
print len(test1)
print test1
cache.set('test1',test1)

print 'test2'
test2= cache.get('test1')
print len(test2)
print test2


It doesn't appear to cache the listitem objects and returns nothing.  Is that a limitation of this, or am I implementing it incorrectly?

Edit, after turning on debugging for the plugin cache script i see that it can't evaluate this type of object, back to the drawing board for me...
 
@zachmorris 
you can call the function using cache
so in your case it will be
python:

import StorageServer
cache = StorageServer.StorageServer('IARL_Test', 24) # (Your plugin name, Cache time in hours)

test1 = cache.cacheFunction(IARL.get_games_as_listitems, game_list_id) #Grabs some xbmcgui listitem objects
print 'test1'
print len(test1)
print test1

print 'test2'
test2= cache.cacheFunction(IARL.get_games_as_listitems, game_list_id) #Return from cache directly for 24 hours
print len(test2)
print test2

Kodi 21 Windows 10 and 11 | 21 Xbox One X | 21 Linux Mint Virginia XFCE | CoreELEC NO 21 nightly S905X4 aarch64
Reply
  • 1
  • 7
  • 8
  • 9
  • 10
  • 11(current)

Logout Mark Read Team Forum Stats Members Help
[Release] Common plugin cache1