Dict.Reset() Not working?

So with the following code:

	Dict['test']="hello"
	Log.Debug("before: %s" %(Dict['test']))
	Dict.Reset()
	Log.Debug("after: %s" %(Dict['test']))

I get:

2014-02-09 20:35:21,109 (21b4) : DEBUG (logkit:13) - before: hello
2014-02-09 20:35:21,109 (21b4) : INFO (datakit:24) - Resetting the dictionary
2014-02-09 20:35:21,109 (21b4) : INFO (datakit:118) - No default dictionary file
2014-02-09 20:35:21,109 (21b4) : DEBUG (logkit:13) - after: hello

Am I missing something about the Dict.Reset()? Do I need a default dictionary file, or is this bugged?

 

I'm running PMS 0.9.8.18.290-11b7fdd on WHS 2011. 

 

Thanks,

Chris

Hello,

The Dict object does appear to behave a little oddly - some might say "buggy", heh.  Another example:

Dict['test'] = 'hello'
Log.Debug('before: %s' % Dict['test'])
Dict.Reset()
Log.Debug('reset: %s' % Dict['test'])
Dict.Save()
Log.Debug('save: %s' % Dict['test'])

Results in this:

2014-09-19 13:53:11,256 (7f069effd700) :  DEBUG (__init__:70) - before: hello
2014-09-19 13:53:11,257 (7f069effd700) :  INFO (datakit:24) - Resetting the dictionary
2014-09-19 13:53:11,258 (7f069effd700) :  INFO (datakit:118) - No default dictionary file
2014-09-19 13:53:11,259 (7f069effd700) :  DEBUG (__init__:72) - reset: hello
2014-09-19 13:53:12,199 (7f069effd700) :  INFO (datakit:131) - Saved the dictionary file
2014-09-19 13:53:12,200 (7f069effd700) :  DEBUG (__init__:74) - save: None

Perhaps there's a caching mechanism in front of it or something?  What's worse is that the above behaviour isn't consistent: sometimes Save() appears to result in the desired effect (clear Dict), and sometimes it doesn't.

For reference:

$ dpkg -s plexmediaserver | grep Version && lsb_release -a | grep Description
Version: 0.9.9.14.531-7eef8c6
Description:    Ubuntu 14.04.1 LTS

Would definitely be interested in feedback from other Plugin devs in case this is actually a bug.

I have the same issu - did you sort it out?

INFO (datakit:118) - No default dictionary file

Unfortunately not. I ended up just setting Dict values to blank to reset them.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.