Evaluation into the closed module `__anon__` breaks incremental compilation because the side effects will not be permanent

I try to compile my project:

julia --project=@. --startup-file=no --trace-compile=sysimage/precompile.jl test/runtests.jl

This compilation gives me the following error:

LoadError: Evaluation into the closed module `__anon__` breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating `__anon__` with `eval` during precompilation - don't do this.
Stacktrace:
  [1] eval
    @ .\boot.jl:360 [inlined]
  [2] _pywrap(o::PyCall.PyObject, mname::Symbol)
    @ PyCall c:\users\user1\.julia\packages\PyCall\3fwVL\src\PyCall.jl:393
  [3] _pywrap_pyimport
    @ c:\users\user1\.julia\packages\PyCall\3fwVL\src\PyCall.jl:414 [inlined]
  [4] _pywrap_pyimport(o::PyCall.PyObject)
    @ PyCall c:\users\user1\.julia\packages\PyCall\3fwVL\src\PyCall.jl:413
  [5] top-level scope
    @ c:\users\user1\.julia\packages\PyCall\3fwVL\src\PyCall.jl:594
  [6] include
    @ .\Base.jl:386 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1235
  [8] top-level scope
    @ none:1
  [9] eval
    @ .\boot.jl:360 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [11] top-level scope
    @ none:1
in expression starting at c:\users\user1\test_project\src\test_project.jl:1
```als
I use PyCall and import one Python function in my project. How to solve this problem?

Welcome! It’s impossible to help debug this without knowing what code you have in your module, what you’re trying to achieve and what you’ve tried so far. Please consider posting a minimally contained example, as described here: