# Exception when download(url) for CSV file

**URL:** <https://discourse.julialang.org/t/exception-when-download-url-for-csv-file/74325>\
**Category:** General Usage\
**Created:** [January 10, 2022, 11:15am UTC](https://discourse.julialang.org/t/exception-when-download-url-for-csv-file/74325 "2022-01-10T11:15:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maajdl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maajdl/32/22838_2.png) [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Post date:** [January 10, 2022, 11:15am UTC](https://discourse.julialang.org/t/exception-when-download-url-for-csv-file/74325/1 "2022-01-10T11:15:29Z")

</div>

Hello

I tried to download a CSV file from a certain URL.  
It triggers an exceptions, as show below.  
In Python, using Pandas, there is no problem to donwload this file.  
I could download the same file from my GitHup repository.

Do you think I could work around this problem?

Thanks

Michel

**Code**

```julia
url = "https://opendata.ecdc.europa.eu/covid19/nationalcasedeath_eueea_daily_ei/csv/data.csv"
file = CSV.File(download(url), missingstring= "NA")
df = DataFrame(file)

```

**Exception**

> Exception calling “DownloadFile” with “2” argument(s): “The request was aborted: Could not create SSL/TLS secure channel.”  
> At line:1 char:96
> 
> - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtoco …
> - 
> - CategoryInfo : NotSpecified: , MethodInvocationException
> - FullyQualifiedErrorId : WebException
> 
> failed process: Process(`'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' -Version 3 -NoProfile -Command "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; (New-Object System.Net.Webclient).DownloadFile('https://opendata.ecdc.europa.eu/covid19/nationalcasedeath_eueea_daily_ei/csv/data.csv', 'C:\Users\mjtoys\AppData\Local\Temp\jl_iVVs1d0JOb')"`, ProcessExited(1)) [1]

---

<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:** [January 10, 2022, 11:31am UTC](https://discourse.julialang.org/t/exception-when-download-url-for-csv-file/74325/2 "2022-01-10T11:31:05Z")

</div>

I cannot reproduce this:

```julia
(jl_BrisNc) pkg> st
      Status `C:\Users\ngudat\AppData\Local\Temp\jl_BrisNc\Project.toml`
  [336ed68f] CSV v0.9.11
  [a93c6f00] DataFrames v1.3.1

julia> using DataFrames, CSV

julia> url = "https://opendata.ecdc.europa.eu/covid19/nationalcasedeath_eueea_daily_ei/csv/data.csv"
"https://opendata.ecdc.europa.eu/covid19/nationalcasedeath_eueea_daily_ei/csv/data.csv"

julia> CSV.read(download(url), DataFrame; missingstring = "NA")
9150×11 DataFrame
  Row │ dateRep day month year cases deaths countriesAndTerritories geoId countryterritoryCode popData2020 continentExp 
      │ String15 Int64 Int64 Int64 Int64 Int64 String15 String3 String3 Int64 String7      
──────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    1 │ 10/01/2022 10 1 2022 10860 2 Austria AT AUT 8901064 Europe
    2 │ 09/01/2022 9 1 2022 7171 7 Austria AT AUT 8901064 Europe
    3 │ 08/01/2022 8 1 2022 9028 8 Austria AT AUT 8901064 Europe

```

The error seems to come from PowerShell, are you on some really old Windows version or something?

---

<div class="post-metadata">

**Author:** ![maajdl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maajdl/32/22838_2.png) [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Post date:** [January 10, 2022, 11:38am UTC](https://discourse.julialang.org/t/exception-when-download-url-for-csv-file/74325/3 "2022-01-10T11:38:05Z")

</div>

Thanks!

Very interresting!  
I am on Windows 8.1 .  
The same works in Python with Pandas.  
Other urls, like on GitHub work well with Julia.

I guess Pandas uses another technique, probably not using PowerShell?  
But I don’t see why other ursl could work in Julia?

Do you know if there would be an alternative way in Julia to download a file?

Thanks

Michel

---

<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:** [January 10, 2022, 11:41am UTC](https://discourse.julialang.org/t/exception-when-download-url-for-csv-file/74325/4 "2022-01-10T11:41:09Z")

</div>

Well that’s certainly a pretty niche operating system, and given it’s close to end-of-life there probably aren’t many people interested in fixing problems with it that can’t be replicated on other OSes.

You can try the `HTTP` package as shown in the CSV.jl docs:

[https://csv.juliadata.org/stable/examples.html#http](https://csv.juliadata.org/stable/examples.html#http)

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [January 10, 2022, 11:50am UTC](https://discourse.julialang.org/t/exception-when-download-url-for-csv-file/74325/5 "2022-01-10T11:50:20Z")

</div>

`download` in Julia v1.6+ shouldn’t be using PowerShell anymore.  
It should be using LibCurl on all operating systems.

I suggest if possible updating you julia version to 1.7, the latest stable release.  
It’s nonbreaking, and you get new features like the OS independent download functionality.
