# CSV won't read after dependency issues

**URL:** <https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898>\
**Category:** New to Julia\
**Created:** [June 6, 2020, 11:43pm UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898 "2020-06-06T23:43:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Anderson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris_anderson/32/9465_2.png) [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)\
**Post date:** [June 6, 2020, 11:43pm UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/1 "2020-06-06T23:43:27Z")

</div>

I just got into a bit of a dependency hell and ended up clearing and reinstalling many packages. Now, when I try to run programs that have worked before, I get an error when I try to read in my data. My code:

df = CSV.read(“MyPath/MyData.csv”)

The error throws at this line and says:

ERROR: LoadError: MethodError: promote\_type2(::Type{Union{Missing, Int64}}, ::Type{Missing}) is ambiguous.

This looks like a missing values error, but this exact same data, full of missing values, used to read in fine. I’m at a loss and can do nothing until I’m able to read stuff in again. I am quite new to this, so hopefully I made an easy to correct mistake.  
Thanks

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [June 7, 2020, 12:40am UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/2 "2020-06-07T00:40:04Z")

</div>

Could you share the dataset (i.e., CSV file) for us to be able to replicate?

It is possible that your `CSV.jl` package is an older version now, that has some limitation or caveat.

---

<div class="post-metadata">

**Author:** ![Chris\_Anderson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris_anderson/32/9465_2.png) [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)\
**Post date:** [June 7, 2020, 1:07am UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/3 "2020-06-07T01:07:28Z")

</div>

Nothing has changed with the dataset, no alterations, etc. I’ve had this same error with CSV 0.3.0, 0.4.0, and 0.6.2.  
I forgot to mention initially that this all started when I updated all my packages, that started the dependency issues. I kept chasing versions and got various errors. Finally I just wiped things and restarted. This exact error came up pre wipe with the older CSV versions and is continuing now.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [June 7, 2020, 2:53am UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/4 "2020-06-07T02:53:27Z")

</div>

I suppose you cannot share the CSV file as you ignored that request.

Also, you could help more by posting the whole error message here or in pastebin, instead of just the header.

If I remember correctly, the ambiguity error happens mostly when some package adds a new method for some existing function of another module, and calls that were previously resolved correctly by the dynamic dispatch become ambiguous. Can you test that line with only `CSV` imported? (and no other packages whatsoever)

I have a CSV file with missing columns here, and if I execute `CSV.read` (from `CSV.jl` version `0.6.2`) it reads correctly. So I cannot reproduce your problem.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [June 7, 2020, 7:28am UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/5 "2020-06-07T07:28:41Z")

</div>

Yes this looks like an error caused by packages being out of sync somehow, you can try just adding CSV in a fresh environment without any other packages and see if that solves it.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [June 7, 2020, 8:14am UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/6 "2020-06-07T08:14:35Z")

</div>

I wonder if the Rust system can avoid this.

---

<div class="post-metadata">

**Author:** ![Chris\_Anderson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris_anderson/32/9465_2.png) [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)\
**Post date:** [June 7, 2020, 4:20pm UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/7 "2020-06-07T16:20:23Z")

</div>

So, after starting everything up again this morning it works. It’s odd, I’ve changed nothing, but now it goes. Thank you for your suggestions. Pkg management is tricky.

Also, yes, I couldn’t share the csv as it contains lots of personal and employment info. Sorry for not mentioning that first time around.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [June 8, 2020, 4:06am UTC](https://discourse.julialang.org/t/csv-wont-read-after-dependency-issues/40898/8 "2020-06-08T04:06:53Z")

</div>

Perhaps you had Revise.jl running and it was interacting in an odd way? Sometimes that can happen.
