JuliaPy / JuliaPy/PyCall.jl

Calling `pywrap` on the Python3 `inspect` module hangs (Linux)

Đang mở
#252 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
1.5k
Fork
186
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I get a hang/lockup when I try to `pywrap` the `inspect` python library when using Python3.4. CPU is pegged at 100% on a single core. There is no problem when using Python2.7. I had a friend replicate this under a fresh vagrant install, and then also had a hang under Python3.4 but not Python 2.7 (in their case, running Julia 0.3.x).

I assume this has something to do with the internal use of the 'inspect' module within PyCall, but i'm not certain.

CC: @porterjamesj

Details below; the hang is on the last line. I would expect instead that "**anon**" (a module) would be returned.

```
julia> versioninfo()
Julia Version 0.4.3
Commit a2f713d (2016-01-12 21:37 UTC)
Platform Info:
System: Linux (x86_64-unknown-linux-gnu)
CPU: Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3

julia> versioninfo()
Julia Version 0.4.3
Commit a2f713d (2016-01-12 21:37 UTC)
Platform Info:
System: Linux (x86_64-unknown-linux-gnu)
CPU: Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3

julia> Pkg.status("PyCall")
- PyCall 1.4.0

julia> ENV["PYTHON"] = "/usr/bin/python3.4"
"/usr/bin/python3.4"

julia> Pkg.build("PyCall")
INFO: Building PyCall
INFO: PyCall is using /usr/bin/python3.4 (Python 3.4.2) at /usr/bin/python3.4, libpython = libpython3.4m

julia> using PyCall
INFO: Recompiling stale cache file /home/bnewbold/.julia/lib/v0.4/PyCall.ji for module PyCall.

julia> pywrap(pyimport("os"))
__anon__

julia> pywrap(pyimport("math"))
__anon__

julia> pywrap(pyimport("inspect"))
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Tái hiện lỗi treo với Julia 0.4.3, PyCall 1.4.0, Python 3.4 và pywrap(pyimport("inspect")), đồng thời so sánh với các ví dụ os và math cũng như Python 2.7. Bắt đầu bằng cách theo dõi pywrap và việc PyCall sử dụng nội bộ mô-đun inspect của Python. Được xem là hoàn tất khi lệnh gọi inspect không còn bị treo và trả về kết quả mô-đun __anon__ như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
julia, python
Lĩnh vực
backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.