I' ve got some config values:
Code
OS_LANGS ={ "en": "eng",
"fr" : "fre",
...........
...........
...........
"pl" : "pol",
"sk" : "slo",
"pt" : "por",
"pt-br" : "pob",
...........
...........
...........
"mk":"mac",
"ms":"may",
"no":"nor", #THIS LINE MAKES PROBLEM
...........
...........
"tr":"tur",
"uk":"ukr",
"vi":"vie"}
Alles anzeigen
which I put to config variable:
Code
OS_LANGS.update({"any":"any"})
config.plugins.subsdownloader.OpenSubtitle1stLang = ConfigSelection(default ="any", choices = make_language_server_list(OS_LANGS))
def make_language_server_list(language_list):
list=[]
for x in language_list:
list.append(getConfigListEntry(_(x),language_list[x]))
return list
When I choose nor option in config (see picture):
[Blockierte Grafik: http://img841.imageshack.us/img841/9159/pict1.png]
And I try to make some operation (I put value as string to another function) I've got following error:
Code
WARNING:root:Ooops, you found a missing language in the config file of OpenSubtitles: Nie. Send a bug report to have it added.
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 792, in emit
self.flush()
File "/usr/lib/python2.6/logging/__init__.py", line 754, in flush
self.stream.flush()
TypeError: flush() takes no arguments (1 given)
Traceback (most recent call last):
File "/usr/lib/enigma2/python/Components/ActionMap.py", line 46, in action
res = self.actions[action]()
File "/usr/lib/enigma2/python/Plugins/Extensions/SubsDownloader2/plugin.py", line 353, in downloadSubtitle
self.subtitle_database=self.subtitles.process(self.movie_filename,self.languageToDownload)
File "/usr/lib/enigma2/python/Plugins/Extensions/SubsDownloader2/SourceCode/periscope/OpenSubtitles.py", line 100, in process
return self.query(moviehash=filehash, langs=langs, bytesize=size, filename=fname)
File "/usr/lib/enigma2/python/Plugins/Extensions/SubsDownloader2/SourceCode/periscope/OpenSubtitles.py", line 168, in query
if langs: search['sublanguageid'] = ",".join([self.getLanguage(lang) for lang in langs])
TypeError: sequence item 0: expected string, NoneType found
(PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.ActionMap instance at 0x1d14be8>>,('ColorActions', 'subSelect')) failed)
]]>
Alles anzeigen
The error is because of nor option .value = no. I mnot sur but Enigma regards my string "no" an polish "Nie" and translates it (line 1 of error).
But I don't know how to collect value "no" (string) and don't have mistake.