-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Labels
Description
While playing around #384, I ran across an issue that I was able to reproduce randomly with the following steps:
- Launch CS:S/Windows server.
- Connect to the server but do not join a team.
- Load the following code:
from players.entity import Player
Player(1).give_named_item('weapon_awp')Randomly results into:
[SP] Caught an Exception:
Traceback (most recent call last):
File "..\addons\source-python\packages\source-python\plugins\command.py", line 164, in load_plugin
plugin = self.manager.load(plugin_name)
File "..\addons\source-python\packages\source-python\plugins\manager.py", line 207, in load
plugin._load()
File "..\addons\source-python\packages\source-python\plugins\instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "..\addons\source-python\plugins\testing\testing.py", line 3, in <module>
Player(1).give_named_item('weapon_awp')
File "..\addons\source-python\packages\source-python\entities\helpers.py", line 108, in __call__
*self.wrapper(self.wrapped_self, *args, **kwargs))
File "..\addons\source-python\packages\source-python\memory\helpers.py", line 334, in __call__
return super().__call__(self._this, *args)
File "<string>", line 1, in <lambda>
KeyError: '__builtins__'
Not sure yet why exactly this happens, but it is also reproducible on master.