Documenter: SystemError while trying to read Statistics.jl

Yes it is public. The branch i have tried to build that gives me the error (using Travis in the github repo but also internally on my PC) is named ‘devmean’. In the master branch the same method is named meanP and the documentation build goes fine there.
https://github.com/Marco-Congedo/PosDefManifold.jl/tree/devmean

The method for the mean function i wrote currently starts at line 995 of https://github.com/Marco-Congedo/PosDefManifold.jl/blob/devmean/src/riemannianGeometry.jl

The @docs is here: https://github.com/Marco-Congedo/PosDefManifold.jl/edit/devmean/docs/src/riemannianGeometry.md

The mean function is imported from Statistics in the main module (currently line 47):
https://github.com/Marco-Congedo/PosDefManifold.jl/blob/devmean/src/PosDefManifold.jl

These are the versions:

[e30172f5] Documenter v0.22.3
[35a29f4d] DocumenterTools v0.1.0

Finally, here is the Stacktrace of the error when i try to build the doc internally (the one generated by Travis is slightly different)

Stacktrace:
[1] #systemerror#43(::Nothing, ::Function, ::String, ::Bool) at .\error.jl:134
[2] systemerror at .\error.jl:134 [inlined]
[3] #open#309(::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Function, ::String) at .\iostream.jl:283
[4] open at .\iostream.jl:275 [inlined]
[5] #open#310(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(Base, Symbol(“##274#275”)){String}, ::String) at .\iostream.jl:367
[6] open at .\iostream.jl:367 [inlined]
[7] read at .\io.jl:297 [inlined]
[8] find_block_in_file(::String, ::String) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Utilities\Utilities.jl:19
[9] report(::Documenter.DocTests.Result, ::String, ::Documenter.Documents.Document) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\DocTests.jl:263
[10] checkresult(::Module, ::Documenter.DocTests.Result, ::Dict{Symbol,Any}, ::Documenter.Documents.Document) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\DocTests.jl:213
[11] eval_repl(::Markdown.Code, ::Module, ::Dict{Symbol,Any}, ::Documenter.Documents.Document, ::Documenter.Documents.Page) at
C:\Users\congedom.julia\packages\Documenter\G5Sup\src\DocTests.jl:150
[12] doctest(::Markdown.Code, ::Dict{Symbol,Any}, ::Documenter.Documents.Document, ::Documenter.Documents.Page) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\DocTests.jl:90
[13] (::getfield(Documenter.DocTests, Symbol(“##1#2”)){Documenter.Documents.Document})(::Markdown.Code) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\DocTests.jl:34
[14] walk(::getfield(Documenter.DocTests, Symbol(“##1#2”)){Documenter.Documents.Document}, ::Dict{Symbol,Any}, ::Markdown.Code) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:464
[15] walk(::Function, ::Dict{Symbol,Any}, ::Array{Any,1}) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:478
[16] walk(::getfield(Documenter.DocTests, Symbol(“##1#2”)){Documenter.Documents.Document}, ::Dict{Symbol,Any}, ::Markdown.MD) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:471
[17] walk(::Function, ::Dict{Symbol,Any}, ::Array{Any,1}) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:478
[18] walk(::getfield(Documenter.DocTests, Symbol(“##1#2”)){Documenter.Documents.Document}, ::Dict{Symbol,Any}, ::Markdown.MD) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:471
[19] walk(::Function, ::Dict{Symbol,Any}, ::Array{Any,1}) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:478
[20] walk(::getfield(Documenter.DocTests, Symbol(“##1#2”)){Documenter.Documents.Document}, ::Dict{Symbol,Any}, ::Markdown.MD) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:471
[21] walk(::Function, ::Dict{Symbol,Any}, ::Documenter.Documents.DocsNode) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:503
[22] walk(::Function, ::Dict{Symbol,Any}, ::Array{Union{DocsNode, Admonition},1}) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:478
[23] walk(::Function, ::Dict{Symbol,Any}, ::Documenter.Documents.DocsNodes) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documents.jl:502
[24] doctest(::Documenter.Documents.Document) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\DocTests.jl:33
[25] runner(::Type{Documenter.Builder.CheckDocument}, ::Documenter.Documents.Document) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Builder.jl:190
[26] dispatch(::Type{Documenter.Builder.DocumentPipeline}, ::Documenter.Documents.Document) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Utilities\Selectors.jl:167
[27] (::getfield(Documenter, Symbol(“##3#8”)))() at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documenter.jl:287
[28] cd(::getfield(Documenter, Symbol(“##3#8”)), ::String) at .\file.jl:85
[29] #makedocs#1(::Bool, ::Documenter.Writers.HTMLWriter.HTML, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol},NamedTuple{(:sitename,),Tuple{String}}}, ::typeof(makedocs)) at C:\Users\congedom.julia\packages\Documenter\G5Sup\src\Documenter.jl:286
[30] (::getfield(Documenter, Symbol(“#kw##makedocs”)))(::NamedTuple{(:sitename,),Tuple{String}}, ::typeof(makedocs)) at .\none:0
[31] top-level scope at none:0