# Error when setting done=true: eval\_data\[i\].env\_id yields IndexError: list index out of range

**URL:** <https://discuss.ray.io/t/error-when-setting-done-true-eval-data-i-env-id-yields-indexerror-list-index-out-of-range/867>\
**Category:** RLlib\
**Created:** [February 12, 2021, 10:50pm UTC](https://discuss.ray.io/t/error-when-setting-done-true-eval-data-i-env-id-yields-indexerror-list-index-out-of-range/867 "2021-02-12T22:50:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![sven1977](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sven1977/32/53_2.png) [@sven1977](https://discuss.ray.io/u/sven1977)\
**Post date:** [February 18, 2021, 1:09pm UTC](https://discuss.ray.io/t/error-when-setting-done-true-eval-data-i-env-id-yields-indexerror-list-index-out-of-range/867/3 "2021-02-18T13:09:45Z")

</div>

Hey @nathanlct , yeah, there was a similar bug in RLlib that was fixed here:

> <https://github.com/ray-project/ray/pull/14031>

I think this should fix your problem as well. Yes, it happened when a new(!) agent enters the episode and at the same time step, the episode terminates, such that this agent has an initial obs, but no action had to be calculated.

---

_[View the full topic](https://discuss.ray.io/t/error-when-setting-done-true-eval-data-i-env-id-yields-indexerror-list-index-out-of-range/867)._
