# About ray.exceptions.RayActorError

**URL:** <https://discuss.ray.io/t/about-ray-exceptions-rayactorerror/14047>\
**Category:** Uncategorized\
**Created:** [March 18, 2024, 11:16am UTC](https://discuss.ray.io/t/about-ray-exceptions-rayactorerror/14047 "2024-03-18T11:16:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shishixcl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/shishixcl/32/5844_2.png) [@shishixcl](https://discuss.ray.io/u/shishixcl)\
**Post date:** [March 18, 2024, 11:16am UTC](https://discuss.ray.io/t/about-ray-exceptions-rayactorerror/14047/1 "2024-03-18T11:16:16Z")

</div>

i Iterate ray dataset result using code below, ds is ray.data.dataset, ray version 2.6.3:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/0/0f5f928be7e02ae1b3d163988bd01c9c069c0e75.png)

Traceback (most recent call last):  
File “pipeline\_big\_data.py”, line 131, in   
for row in ds.iter\_rows():  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/iterator.py”, line 237, in iter\_rows  
for batch in self.iter\_batches(\*\*iter\_batch\_args):  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/iterator.py”, line 189, in iter\_batches  
yield from iter\_batches(  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/iter\_batches.py”, line 176, in iter\_batches  
next\_batch = next(async\_batch\_iter)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/util.py”, line 289, in make\_async\_gen  
raise next\_item  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/util.py”, line 266, in execute\_computation  
for item in fn(thread\_safe\_generator):  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/iter\_batches.py”, line 167, in \_async\_iter\_batches  
yield from extract\_data\_from\_batch(batch\_iter)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/util.py”, line 210, in extract\_data\_from\_batch  
for batch in batch\_iter:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/iter\_batches.py”, line 306, in restore\_original\_order  
for batch in batch\_iter:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/iter\_batches.py”, line 218, in threadpool\_computations\_format\_collate  
yield from formatted\_batch\_iter  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/util.py”, line 158, in format\_batches  
for batch in block\_iter:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/util.py”, line 117, in blocks\_to\_batches  
for block in block\_iter:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/util.py”, line 54, in resolve\_block\_refs  
for block\_ref in block\_ref\_iter:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/iter\_batches.py”, line 254, in prefetch\_batches\_locally  
for block\_ref, metadata in block\_ref\_iter:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/block\_batching/util.py”, line 246, in **next**  
return next(self.it)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/legacy\_compat.py”, line 51, in execute\_to\_legacy\_block\_iterator  
for bundle in bundle\_iter:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/interfaces.py”, line 548, in **next**  
return self.get\_next()  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/streaming\_executor.py”, line 129, in get\_next  
raise item  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/streaming\_executor.py”, line 187, in run  
while self.\_scheduling\_loop\_step(self.\_topology) and not self.\_shutdown:  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/streaming\_executor.py”, line 235, in \_scheduling\_loop\_step  
process\_completed\_tasks(topology)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/streaming\_executor\_state.py”, line 333, in process\_completed\_tasks  
op.notify\_work\_completed(ref)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/operators/actor\_pool\_map\_operator.py”, line 219, in notify\_work\_completed  
task.output = self.\_map\_ref\_to\_ref\_bundle(ref)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/data/\_internal/execution/operators/map\_operator.py”, line 357, in \_map\_ref\_to\_ref\_bundle  
all\_refs = list(ray.get(ref))  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/\_private/auto\_init\_hook.py”, line 24, in auto\_init\_wrapper  
return fn(\*args, \*\*kwargs)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/\_private/client\_mode\_hook.py”, line 103, in wrapper  
return func(\*args, \*\*kwargs)  
File “/opt/conda/envs/myenv/lib/python3.8/site-packages/ray/\_private/worker.py”, line 2526, in get  
raise value  
ray.exceptions.RayActorError: The actor died unexpectedly before finishing this task.

how can i avoid this error
