# Too many plays for get\_all\_plays script?

**URL:** <https://forum.flow.com/t/too-many-plays-for-get-all-plays-script/2928>\
**Category:** Flow Go SDK\
**Created:** [March 15, 2022, 11:39pm UTC](https://forum.flow.com/t/too-many-plays-for-get-all-plays-script/2928 "2022-03-15T23:39:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MCinPA](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@MCinPA](https://forum.flow.com/u/MCinPA)\
**Post date:** [March 15, 2022, 11:39pm UTC](https://forum.flow.com/t/too-many-plays-for-get-all-plays-script/2928/1 "2022-03-15T23:39:28Z")

</div>

The get\_all\_plays script in the nba-smart-contracts returns an error. Is this because the amount of data returned is too large for the script (ie there are too many plays for the script to work as originally intended)?

**script:**  
import TopShot from 0x0b2a3299cc857e29  
pub fun main(): [TopShot.Play] {  
return TopShot.getAllPlays()  
}

**error:** rpc error: code = ResourceExhausted desc = grpc: received message larger than max (5966328 vs. 4194304)

---

<div class="post-metadata">

**Author:** ![NasirAliShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/nasiralishah/32/519_2.png) [@NasirAliShah](https://forum.flow.com/u/NasirAliShah)\
**Post date:** [April 1, 2022, 2:37pm UTC](https://forum.flow.com/t/too-many-plays-for-get-all-plays-script/2928/2 "2022-04-01T14:37:08Z")

</div>

I checked this in my side it returns all the plays, working fine  
update your flow cli version maybe it is creating the issue.

---

<div class="post-metadata">

**Author:** ![vr1](https://avatars.discourse-cdn.com/v4/letter/v/c37758/32.png) [@vr1](https://forum.flow.com/u/vr1)\
**Post date:** [April 4, 2022, 8:38am UTC](https://forum.flow.com/t/too-many-plays-for-get-all-plays-script/2928/3 "2022-04-04T08:38:53Z")

</div>

Hi @MCinPA , did upgrading the Flow CLI solved the issue?

---

<div class="post-metadata">

**Author:** ![MCinPA](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@MCinPA](https://forum.flow.com/u/MCinPA)\
**Post date:** [April 4, 2022, 12:53pm UTC](https://forum.flow.com/t/too-many-plays-for-get-all-plays-script/2928/4 "2022-04-04T12:53:34Z")

</div>

Hi @vr1 @NasirAliShah thanks for the information. it looks like the issue is actually with using the go flow SDK and the grpc settings there. In the cases where querying a single block resulting in the error using the go sdk, i was able to use the CLI on the same block without an error. Thanks again for suggesting the CLI, and I shared the error info at the go sdk github page here [https://github.com/onflow/flow-go-sdk/issues/262](https://github.com/onflow/flow-go-sdk/issues/262)
