ES/Python Traceback

All other Source.Python topics and issues.
para97
Junior Member
Posts: 24
Joined: Thu Mar 07, 2019 1:24 pm

ES/Python Traceback

Postby para97 » Sun Apr 14, 2019 12:58 pm

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
para97
Junior Member
Posts: 24
Joined: Thu Mar 07, 2019 1:24 pm

Re: ES/Python Traceback

Postby para97 » Sun Apr 14, 2019 1:15 pm

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.
Last edited by Ayuto on Sun Apr 14, 2019 8:18 pm, edited 1 time in total.
Reason: Added code tags
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: ES/Python Traceback

Postby satoon101 » Sun Apr 14, 2019 1:54 pm

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.
Image
para97
Junior Member
Posts: 24
Joined: Thu Mar 07, 2019 1:24 pm

Re: ES/Python Traceback

Postby para97 » Mon Apr 15, 2019 2:16 pm

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'
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: ES/Python Traceback

Postby Ayuto » Mon Apr 15, 2019 4:15 pm

Seems like it's completely missing the translations. Even the fallback language (en).
para97
Junior Member
Posts: 24
Joined: Thu Mar 07, 2019 1:24 pm

Re: ES/Python Traceback

Postby para97 » Wed Apr 17, 2019 4:40 pm

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?
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: ES/Python Traceback

Postby Ayuto » Wed Apr 17, 2019 5:39 pm

Do you want to share the solution? That might also help others.
para97
Junior Member
Posts: 24
Joined: Thu Mar 07, 2019 1:24 pm

Re: ES/Python Traceback

Postby para97 » Wed Apr 17, 2019 10:47 pm

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
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: ES/Python Traceback

Postby Ayuto » Thu Apr 18, 2019 5:28 am

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.
para97
Junior Member
Posts: 24
Joined: Thu Mar 07, 2019 1:24 pm

Re: ES/Python Traceback

Postby para97 » Thu Apr 18, 2019 9:39 am

Nope, I used to do a freshinstall on my testserver with no modified .py files and got that tracebacks
para97
Junior Member
Posts: 24
Joined: Thu Mar 07, 2019 1:24 pm

Re: ES/Python Traceback

Postby para97 » Thu Apr 18, 2019 5:38 pm

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.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 36 guests