Export of SymPy symbol from module gives ReadOnlyMemoryError
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện việc truy cập module và REPL được thể hiện trong issue, sau đó bắt đầu từ SymPy's src/types.jl:73, nơi việc hiển thị SymPy.Sym bị lỗi. Đọc các frame được tham chiếu trong PyCall exception.jl và pyfncall.jl để lần theo đường đi của lỗi. Hoàn thành khi có thể truy cập và hiển thị symbol đã export mà không gặp ReadOnlyMemoryError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
Ref: https://discourse.julialang.org/t/export-of-sympy-symbol-from-module-gives-readonlymemoryerror/43426
- Ngôn ngữ chính
- Julia
- Star
- 282
- Fork
- 59
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JuliaPy/SymPy.jl
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
Not updated in registryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của JuliaPy/SymPy.jl
Issue tương tự
-
broken links in docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
JuliaPhysics/BeamletOptics.jl#127 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Chains resumed from `initial_state` take `num_warmup + 1` warm-up stepsCó thể đã có người làm @thevolatilebit đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
TuringLang/AbstractMCMC.jl#220 ·
-
found-by-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
exanauts/SparseDirectSolver.jl#92 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`inv` of a dense matrix fails for arrays whose `parent` is not an array of the same kindCó thể đã có người làm @devmotion đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
JuliaLang/LinearAlgebra.jl#1740 ·
Maintainer thường phản hồi trong vòng 2 ngày