BSSReader reads literally everything
Opened this issue · 1 comments
Pigu-A commented
Not sure if this is a problem in my OS but a preprocessor somehow don't let me make it with this error:
Traceback (most recent call last):
File "prequeue.py", line 11, in <module>
import preprocessor
File "/home/pigu/pokecrystal/preprocessor.py", line 30, in <module>
from extras.pokemontools.battle_animations import (
File "/home/pigu/pokecrystal/extras/pokemontools/battle_animations.py", line 43, in <module>
objs = { k: v for k, v in anims.items() if 'ANIM_OBJ' in v }
File "/home/pigu/pokecrystal/extras/pokemontools/battle_animations.py", line 43, in <dictcomp>
objs = { k: v for k, v in anims.items() if 'ANIM_OBJ' in v }
TypeError: argument of type 'int' is not iterable
So I decided to print anims variable, it appears that it contains constant entries and every Python builtins entries as well...
So, is there a way to work around this problem?
yenatch commented
Instead of writing an expression parser, constants are intepreted with eval
. eval
optionally takes a dict of supplementary variables (globals). If __builtins__
isn't already a key, it's added to the dict.
This was addressed some time ago in 0dd6b20 but never merged into the main fork. This is fixed in #86.