# Error executing script listing large TopShot account

**URL:** <https://forum.flow.com/t/error-executing-script-listing-large-topshot-account/3600>\
**Category:** Flow CLI\
**Created:** [September 22, 2022, 2:08am UTC](https://forum.flow.com/t/error-executing-script-listing-large-topshot-account/3600 "2022-09-22T02:08:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkdalemu](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jkdalemu](https://forum.flow.com/u/jkdalemu)\
**Post date:** [September 22, 2022, 2:08am UTC](https://forum.flow.com/t/error-executing-script-listing-large-topshot-account/3600/1 "2022-09-22T02:08:28Z")

</div>

Is there some sort of upper limit on script execution in the CLI? I’ve been exploring some of the example script in the TopShot repo and I noticed if I try to list all the moments owned by some od the large accounts, I see the following error:

```
❌ Command Error: failed to submit executable script: client: rpc error: code = Unknown desc = 3 errors occurred:
	* rpc error: code = DeadlineExceeded desc = failed to execute the script on the execution node execution-9686399a8a5418a12e762cfaeff2ea348c2137f554560917760e0d47acf2cda4@execution-001.mainnet19.nodes.onflow.org:3569=100: rpc error: code = DeadlineExceeded desc = context deadline exceeded
	* rpc error: code = DeadlineExceeded desc = failed to execute the script on the execution node execution-160241f88cbfaa0f361cf64adb0a1c9fc19dec1daf4b96550cd67b7a9fb26cd9@execution-002.mainnet19.nodes.onflow.org:3569=100: rpc error: code = DeadlineExceeded desc = context deadline exceeded
	* rpc error: code = DeadlineExceeded desc = failed to execute the script on the execution node execution-e52cbcd825e328acac8db6bcbdcbb6e7724862c8b89b09d85edccf41ff9981eb@p2p.9ceef7f8-b83c-49d9-b116-626d1e8bc849.flow.bison.run:3569=100: rpc error: code = DeadlineExceeded desc = context deadline exceededPreformatted text

```

**Script** :  
import TopShot from 0x0b2a3299cc857e29  
import MetadataViews from 0x1d7e57aa55817448  
pub fun main(account: Address): [AnyStruct] {  
let acct = getAccount(account)  
let collectionRef = acct.getCapability(/public/MomentCollection)  
.borrow\<&{TopShot.MomentCollectionPublic}\>()!  
let moments: [AnyStruct] = []  
for id in collectionRef.getIDs() {  
let nft = collectionRef.borrowMoment(id: id)  
?? panic(“Could not borrow a reference to the specified moment”)  
//Get Moment Info  
let data = nft.data

```
        //Get Metadata
        let view = nft.resolveView(Type<TopShot.TopShotMomentMetadataView>())!
        let metadata = view as! TopShot.TopShotMomentMetadataView
        moments.append({"id": id, "serial":data.serialNumber, "play_id":data.playID, "set_id":data.setID})
    }
    return moments
```
