Page 1 of 1
ES/Python Traceback
Posted: Sun Apr 14, 2019 12:58 pm
by para97
Hi,
since today our console is getting these tracebacks. Any one have further information about these errors?
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/wcs/xtell.py", line 99, in tell
text = strings(text, tokens, langlib.getLangAbbreviation(player.language))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 71, in __call__
return self.expand(text, opts, lang)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 51, in expand
k = self[text]
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 49, in __getitem__
return super(Strings, self).__getitem__(self.fallback)
File "../addons/source-python/packages/site-packages/configobj.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
Thanks
Re: ES/Python Traceback
Posted: Sun Apr 14, 2019 1:15 pm
by para97
Same for setfx wc
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/wcs/setfx.py", line 19, in _setfx_command
amount = command[4]
IndexError: Index out of range.
Re: ES/Python Traceback
Posted: Sun Apr 14, 2019 1:54 pm
by satoon101
The first one does not contain the full traceback, so hard to tell. The second looks like a command is being sent without all the necessary arguments.
Re: ES/Python Traceback
Posted: Mon Apr 15, 2019 2:16 pm
by para97
So I guess its a wcs tell string problem.
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/wcs/xtell.py", line 99, in tell
text = strings(text, tokens, langlib.getLangAbbreviation(player.language))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 71, in __call__
return self.expand(text, opts, lang)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 51, in expand
k = self[text]
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 49, in __getitem__
return super(Strings, self).__getitem__(self.fallback)
File "../addons/source-python/packages/site-packages/configobj.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
KeyError: 'en'
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/wcs/xtell.py", line 99, in tell
text = strings(text, tokens, langlib.getLangAbbreviation(player.language))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 71, in __call__
return self.expand(text, opts, lang)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 51, in expand
k = self[text]
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 49, in __getitem__
return super(Strings, self).__getitem__(self.fallback)
File "../addons/source-python/packages/site-packages/configobj.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
KeyError: 'en'
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/wcs/xtell.py", line 99, in tell
text = strings(text, tokens, langlib.getLangAbbreviation(player.language))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 71, in __call__
return self.expand(text, opts, lang)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 51, in expand
k = self[text]
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 49, in __getitem__
return super(Strings, self).__getitem__(self.fallback)
File "../addons/source-python/packages/site-packages/configobj.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
KeyError: 'en'
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/wcs/xtell.py", line 99, in tell
text = strings(text, tokens, langlib.getLangAbbreviation(player.language))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 71, in __call__
return self.expand(text, opts, lang)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 51, in expand
k = self[text]
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/langlib.py", line 49, in __getitem__
return super(Strings, self).__getitem__(self.fallback)
File "../addons/source-python/packages/site-packages/configobj.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
KeyError: 'en'
Re: ES/Python Traceback
Posted: Mon Apr 15, 2019 4:15 pm
by Ayuto
Seems like it's completely missing the translations. Even the fallback language (en).
Re: ES/Python Traceback
Posted: Wed Apr 17, 2019 4:40 pm
by para97
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/events/listener.py", line 92, in fire_game_event
callback(game_event)
File "../addons/source-python/plugins/wcs/mana.py", line 93, in _player_death
if mana_players[userid].regeneration_repeat.status != RepeatStatus.STOPPED:
KeyError: 3
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/events/listener.py", line 92, in fire_game_event
callback(game_event)
File "../addons/source-python/plugins/wcs/mana.py", line 93, in _player_death
if mana_players[userid].regeneration_repeat.status != RepeatStatus.STOPPED:
KeyError: 3
Fixxed it, now I'm getting these after a player disconnects. Any ideas?
Re: ES/Python Traceback
Posted: Wed Apr 17, 2019 5:39 pm
by Ayuto
Do you want to share the solution? That might also help others.
Re: ES/Python Traceback
Posted: Wed Apr 17, 2019 10:47 pm
by para97
It was caused due wrong syntaxes in the ES blocks, aswell as a modified wcs.py - fixed the blocks and removed the extra code from ws.py
Re: ES/Python Traceback
Posted: Thu Apr 18, 2019 5:28 am
by Ayuto
It would have been good to know that in the very beginning. Is the last error perhaps also caused by modifications on your own? Because I had a quick glance at the original code, which seems to be correct.
Re: ES/Python Traceback
Posted: Thu Apr 18, 2019 9:39 am
by para97
Nope, I used to do a freshinstall on my testserver with no modified .py files and got that tracebacks
Re: ES/Python Traceback
Posted: Thu Apr 18, 2019 5:38 pm
by para97
Downloaded the new ES Simulator and still having errors.
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/es_emulator/logic.py", line 103, in __call__
es.addons.callBlock(self.block_name)
File "../addons/source-python/plugins/es_emulator/eventscripts/es.py", line 356, in callBlock
self.Blocks[blockname]()
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/cmdlib.py", line 172, in callbackServer
cmd_manager.callback(cmd_manager.server_commands, es.getargv(0))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/cmdlib.py", line 111, in callback
cmdlist[name].execute(self.CMDArgs(es.getargv(x) for x in range(1, es.getargc())))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/cmdlib.py", line 206, in execute
self.callback(args)
File "../addons/source-python/plugins/wcs/xtell.py", line 45, in register
if exists('userid', int(user)):
ValueError: invalid literal for int() with base 10: ''
L 04/18/2019 - 19:27:18: Starting Freeze period
L 04/18/2019 - 19:27:18: World triggered "Match_Start" on "de_dust2"
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/wcs/setfx.py", line 17, in _setfx_command
userid = int(command[2])
ValueError: invalid literal for int() with base 10: ''
Sorry for double posting.