facebookresearch/ELF

KeyError '_agent_name' with ex_elfpy.py

ethanluoyc opened this issue · 2 comments

Hi, I run into the following issue when running ex_elfpy.py.

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/Users/Ethan/anaconda3/envs/elf/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Users/Ethan/anaconda3/envs/elf/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/Ethan/dev/github/facebook/ELF/elf_python/memory_receiver.py", line 373, in _receive
    m =  self._preprocess(raw_data)
  File "/Users/Ethan/dev/github/facebook/ELF/elf_python/memory_receiver.py", line 356, in _preprocess
    data["_key"] = self._get_key(data)
  File "/Users/Ethan/dev/github/facebook/ELF/elf_python/memory_receiver.py", line 364, in _get_key
    return "%s-%d-%d" % (data["_agent_name"], data["_game_counter"], data["_seq"])
KeyError: '_agent_name'

The threads are throwing exceptions and as a result the program is stuck. Is there a quick way to fix this issue?

Thanks

And I've got the same problem.

It's seemed that adding 'b' before '_agent_name' will be ok.