Export of SymPy symbol from module gives ReadOnlyMemoryError

When I import the following module

module MyMod
using SymPy: symbols
export b
b = symbols("b")
end

and I try to access b from the REPL, I get:

julia> using MyMod; b
Error showing value of type SymPy.Sym:
ERROR: ReadOnlyMemoryError()
Stacktrace:
 [1] macro expansion at C:\Users\michele.zaffalon\.julia\packages\PyCall\zqDXB\src\exception.jl:93 [inlined]
 [2] #110 at C:\Users\michele.zaffalon\.julia\packages\PyCall\zqDXB\src\pyfncall.jl:43 [inlined]
 [3] disable_sigint at .\c.jl:446 [inlined]
 [4] __pycall! at C:\Users\michele.zaffalon\.julia\packages\PyCall\zqDXB\src\pyfncall.jl:42 [inlined]
 [5] _pycall!(::PyCall.PyObject, ::PyCall.PyObject, ::Tuple{SymPy.Sym}, ::Int64, ::Ptr{Nothing}) at C:\Users\michele.zaffalon\.julia\packages\PyCall\zqDXB\src\pyfncall.jl:29
 [6] _pycall! at C:\Users\michele.zaffalon\.julia\packages\PyCall\zqDXB\src\pyfncall.jl:11 [inlined]
 [7] #_#117 at C:\Users\michele.zaffalon\.julia\packages\PyCall\zqDXB\src\pyfncall.jl:86 [inlined]
 [8] (::PyCall.PyObject)(::SymPy.Sym) at C:\Users\michele.zaffalon\.julia\packages\PyCall\zqDXB\src\pyfncall.jl:86
 [9] show(::IOContext{REPL.Terminals.TTYTerminal}, ::MIME{Symbol("text/plain")}, ::SymPy.Sym) at C:\Users\michele.zaffalon\.julia\packages\SymPy\7D3De\src\types.jl:73
 [10] display(::REPL.REPLDisplay, ::MIME{Symbol("text/plain")}, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:137
 [11] display(::REPL.REPLDisplay, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:141
 [12] display(::Any) at .\multimedia.jl:323
 [13] #invokelatest#1 at .\essentials.jl:712 [inlined]
 [14] invokelatest at .\essentials.jl:711 [inlined]
 [15] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:161
 [16] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:146
 [17] (::REPL.var"#do_respond#38"{Bool,REPL.var"#48#57"{REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:729
 [18] #invokelatest#1 at .\essentials.jl:712 [inlined]
 [19] invokelatest at .\essentials.jl:711 [inlined]
 [20] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\LineEdit.jl:2354
 [21] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:1055
 [22] run_repl(::REPL.AbstractREPL, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:206
 [23] (::Base.var"#764#766"{Bool,Bool,Bool,Bool})(::Module) at .\client.jl:383
 [24] #invokelatest#1 at .\essentials.jl:712 [inlined]
 [25] invokelatest at .\essentials.jl:711 [inlined]
 [26] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at .\client.jl:367
 [27] exec_options(::Base.JLOptions) at .\client.jl:305
 [28] _start() at .\client.jl:484

This used to work about two years ago when I last tried it.