You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating an instance object of this class inside bot.py
class Test:
def __init__(self, value):
self.x = 3
self.x += value
produces the following error
Traceback (most recent call last):
File "/home/nickger/Dev/Battlehack/venv/src/run.py", line 98, in <module>
code_container1 = CodeContainer.from_directory(args.player[0])
File "/home/nickger/Dev/Battlehack/venv/lib/python3.6/site-packages/battlehack20/engine/container/code_container.py", line 34, in from_directory
return cls.from_directory_dict(code)
File "/home/nickger/Dev/Battlehack/venv/lib/python3.6/site-packages/battlehack20/engine/container/code_container.py", line 20, in from_directory_dict
compiled = compile_restricted(cls.preprocess(dic[filename]), filename, 'exec')
File "/home/nickger/Dev/Battlehack/venv/lib/python3.6/site-packages/RestrictedPython/compile.py", line 205, in compile_restricted
raise SyntaxError(result.errors)
SyntaxError: ('Line 4: Augmented assignment of attributes is not allowed.',)
The text was updated successfully, but these errors were encountered:
This error is thrown even if you dont call the constructor.
In other words if the above class exists in a different file (or in the bot.py) inside the folder, the above error occurs.
Creating an instance object of this class inside bot.py
produces the following error
The text was updated successfully, but these errors were encountered: