Errors parsing when reading STATA file

I am reading a STATA file (likely created in 2014; not known which STATA version was used) and get the following error:

using DataFrames
[ Info: Precompiling DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]

julia> using StatFiles
[ Info: Precompiling StatFiles [1463e38c-9381-5320-bcd4-4134955f093a]

julia> df = DataFrame(load("/Users/lutz/Documents/projects/p2018/migrant_wage_gains/MAFE_data/Ghana/Stata/gh_qb_migration_140417.dta"));
ERROR: Error parsing /Users/lutz/Documents/projects/p2018/migrant_wage_gains/MAFE_data/Ghana/Stata/gh_qb_migration_140417.dta: 17
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] parse_data_file!(::ReadStat.ReadStatDataFrame, ::Ptr{Nothing}, ::String, ::Type{Val{:dta}}) at /Users/lutz/.julia/packages/ReadStat/JnXAZ/src/ReadStat.jl:266
 [3] read_data_file(::String, ::Type) at /Users/lutz/.julia/packages/ReadStat/JnXAZ/src/ReadStat.jl:237
 [4] read_dta at /Users/lutz/.julia/packages/ReadStat/JnXAZ/src/ReadStat.jl:274 [inlined]
 [5] getiterator(::StatFiles.StatFile) at /Users/lutz/.julia/packages/StatFiles/gxVDC/src/StatFiles.jl:57
 [6] nondatavaluerows(::StatFiles.StatFile) at /Users/lutz/.julia/packages/Tables/FXXeK/src/tofromdatavalues.jl:16
 [7] columns at /Users/lutz/.julia/packages/Tables/FXXeK/src/fallbacks.jl:177 [inlined]
 [8] #DataFrame#412(::Bool, ::Type{DataFrame}, ::StatFiles.StatFile) at /Users/lutz/.julia/packages/DataFrames/yH0f6/src/other/tables.jl:32
 [9] DataFrame(::StatFiles.StatFile) at /Users/lutz/.julia/packages/DataFrames/yH0f6/src/other/tables.jl:23
 [10] top-level scope at REPL[9]:100: 

The file contains 2,000 rows and about 100 variables of mixed types (including strings). The data are confidential, so I cannot post the file.

I’m on Julia 1.2, MacOS Catalina.

Stat/Transfer 14 has no problem reading the file and converting it to Excel.

Any suggestions on working around this would be appreciated.

If other Stata files work fine, then it’s likely an issue in the ReadStat library, which ReadStat.jl wraps. I’ve experienced the same error message with certain Stata files. Try opening the file in a recent Stata and saving it in an older Stata format (saveold), that has usually worked for me.

Thanks - I took the opposite approach - save it in V15; it worked.