# ERROR: LoadError: ArgumentError: reducing over an empty collection is not allowed

**URL:** <https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 2, 2019, 3:26pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758 "2019-12-02T15:26:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gohoudanon](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@gohoudanon](https://discourse.julialang.org/u/gohoudanon)\
**Post date:** [December 2, 2019, 3:26pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/1 "2019-12-02T15:26:56Z")

</div>

Hi all,  
I am not a developer but use Julia for my research as there is an existing nowcasting model.  
The model works well for the US data (GDP) but comes with ERROR when I replace (manually) the US GDP dates by country of interest GDP dates.  
Replacing these data in excel return error in julia as on the image below .

1- Full Error view

 ![23%20PM](https://global.discourse-cdn.com/julialang/original/3X/f/3/f3bfcc7535b00a0446cca2594dd844a33804b012.png)

PS: I did even change the sheet but still the same error. It only works for the original USD GDP dates.  
Thanks

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [December 2, 2019, 3:42pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/2 "2019-12-02T15:42:58Z")

</div>

This means that some iterable that you were expecting to be non-empty is empty. Sounds like you inadventently created an empty iterable when changing the data (possibly because it’s no longer getting read in correctly). It looks to me like `maximum` is being called on an empty iterable at `readdata.jl` on line 173. If I were you I’d look at the object it’s being called on and try to figure out why it’s empty.

---

<div class="post-metadata">

**Author:** ![gohoudanon](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@gohoudanon](https://discourse.julialang.org/u/gohoudanon)\
**Post date:** [December 2, 2019, 4:24pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/3 "2019-12-02T16:24:26Z")

</div>

Great thanks ExpandingMan,  
have a look on this

 ![13%20PM](https://global.discourse-cdn.com/julialang/original/3X/b/7/b7ff3108f54c78e9222b8457b0cf5c5a3267df50.png)  
this is what I found as the error but cannot figure it out on the excel file (wil sent it in the next reply)

---

<div class="post-metadata">

**Author:** ![gohoudanon](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@gohoudanon](https://discourse.julialang.org/u/gohoudanon)\
**Post date:** [December 2, 2019, 4:32pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/4 "2019-12-02T16:32:02Z")

</div>

Here is the excel file and in yellow the US GDP dates that is impossible to replace even manually

 ![40%20PM](https://global.discourse-cdn.com/julialang/original/3X/e/4/e46d9fffff6733197f99b4a289829f94b5f376af.png)

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [December 2, 2019, 4:35pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/5 "2019-12-02T16:35:13Z")

</div>

Looks to me like `released_months` is coming up empty, you’ll probably have to start digging into why that is.

---

<div class="post-metadata">

**Author:** ![gohoudanon](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@gohoudanon](https://discourse.julialang.org/u/gohoudanon)\
**Post date:** [December 2, 2019, 5:04pm UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/6 "2019-12-02T17:04:03Z")

</div>

OK thanks ExpandingMan for your help. Going back to struggle 🙂

---

<div class="post-metadata">

**Author:** ![gohoudanon](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@gohoudanon](https://discourse.julialang.org/u/gohoudanon)\
**Post date:** [December 3, 2019, 3:01am UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/7 "2019-12-03T03:01:49Z")

</div>

IT 'S WORKING PERFECT NOW !  
THANKS A LOT

 ![37%20AM](https://global.discourse-cdn.com/julialang/original/3X/e/0/e06f7b67580250ed91c244de4ec2b80ffe68ccc1.png)

---

<div class="post-metadata">

**Author:** ![gvarthi](https://avatars.discourse-cdn.com/v4/letter/g/e9bcb4/32.png) [@gvarthi](https://discourse.julialang.org/u/gvarthi)\
**Post date:** [June 15, 2020, 11:42am UTC](https://discourse.julialang.org/t/error-loaderror-argumenterror-reducing-over-an-empty-collection-is-not-allowed/31758/8 "2020-06-15T11:42:05Z")

</div>

What is your resolution? Can you post the solution?
