# Max\_episode\_steps warning

**URL:** <https://discuss.ray.io/t/max-episode-steps-warning/8993>\
**Category:** RLlib\
**Created:** [January 17, 2023, 12:26pm UTC](https://discuss.ray.io/t/max-episode-steps-warning/8993 "2023-01-17T12:26:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AI360](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@AI360](https://discuss.ray.io/u/AI360)\
**Post date:** [January 17, 2023, 12:26pm UTC](https://discuss.ray.io/t/max-episode-steps-warning/8993/1 "2023-01-17T12:26:14Z")

</div>

Hello,  
I am writing to ask a question about RLlib.  
I am creating a Customized Environment in Ray. Whenever I start training of the agent, the simulation outputs show this message:  
“Your env doesn’t have a .spec.max\_episode\_steps attribute.” !!  
“`_get_slice_indices` has been deprecated. This will raise an error in the future!”

Even though I have defined max\_episode\_steps in configuration (i.e., horizon or soft\_horizon).

I would appreciate it if you could help me to solve these problems.

Thanks,

---

<div class="post-metadata">

**Author:** ![avnishn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/avnishn/32/1544_2.png) [@avnishn](https://discuss.ray.io/u/avnishn)\
**Post date:** [January 19, 2023, 6:27pm UTC](https://discuss.ray.io/t/max-episode-steps-warning/8993/2 "2023-01-19T18:27:43Z")

</div>

This looks like a duplicate of [Max\_episode\_steps attribute in customized environment](https://discuss.ray.io/t/max-episode-steps-attribute-in-customized-environment/8997) .
