Palli
August 8, 2019, 2:21pm
15
I’m looking into that. FYI: Indirectly to help me with at, I’m trying to use this package (that must have worked at some point), and I get a segfault when precompiling in Julia 1.0.4, but not in Julia 1.1 (can someone explain the ERROR there?), while still not working… so I opened an issue:
opened 01:26PM - 08 Aug 19 UTC
I'm looking into debugging this, I thought it might be the new improved PyCall n… ot working with this package, but even forcing the rev. you used didn't work:
[I doubt it should matter, but maybe me using Julia Version 1.2.0-DEV.55 is the problem? At least Julia 1.1.1 (or 1.0.x) should work, see next comment. <s>Have not yet checked 1.0.x</s>]
```
julia> py2jl"""
def sum_by(f, seq):
s = 0
for e in seq:
s = s + f(e)
return s
result = sum_by(lambda x: x * 10, [1, 2, 3])
"""
ERROR: LoadError: "class: Module, attributes: Symbol[:class, :body]."
Stacktrace:
[1] (::getfield(Py2Jl.ASTGen, Symbol("##12#122")){Nothing,getfield(Py2Jl.ASTGen, Symbol("#trans_block#121")){getfield(Py2Jl.ASTGen, Symbol("##7#114")){Nothing}}})(::Dict{Symbol,Any}) at /home/qwerty/.julia/packages/Py2Jl/G6hOG/src/ASTGen.jl:392
[2] to_ast(::Nothing, ::Dict{Symbol,Any}) at /home/qwerty/.julia/packages/Py2Jl/G6hOG/src/ASTGen.jl:398
[3] py2jl(::Nothing, ::String) at /home/qwerty/.julia/packages/Py2Jl/G6hOG/src/Py2Jl.jl:43
[4] @py2jl_str(::LineNumberNode, ::Module, ::Any) at /home/qwerty/.julia/packages/Py2Jl/G6hOG/src/Py2Jl.jl:51
in expression starting at REPL[5]:1
```
(v1.2) pkg> st
Status `~/.julia/environments/v1.2/Project.toml`
[537997a7] AbstractPlotting v0.9.5
[6e4b80f9] BenchmarkTools v0.4.2
[a93c6f00] DataFrames v0.17.1
[864edb3b] DataStructures v0.15.0
[e9467ef8] GLMakie v0.0.4
[54eb57ff] InteractiveCodeSearch v0.3.0
[6042db11] JDBC v0.4.1
[682c06a0] JSON v0.21.0
[d8e11817] MLStyle v0.3.0
[ee78f7c6] Makie v0.9.1
[dbd62bd0] MakieGallery v0.0.4
[c020b1a1] NaturalSort v0.0.1+ #fix_for_1_0_0 (http://github.com/endrebak/NaturalSort.jl)
[9b87118b] PackageCompiler v0.6.3
[91a5bcdd] Plots v0.26.0
[e53ffe30] Py2Jl v0.1.0 #master (https://github.com/JuliaCN/Py2Jl.jl)
[438e738f] PyCall v1.91.2+ #1309efc (https://github.com/JuliaPy/PyCall.jl.git)
[d330b81b] PyPlot v2.7.0
[bf110322] Python v0.1.0 #master (https://github.com/229668880/Python.jl)
[1a8c2f83] Query v0.11.0
[e6cf234a] RandomNumbers v1.2.0
[f2b01f46] Roots v0.8.1
[3646fa90] ScikitLearn v0.5.0
[992d4aef] Showoff v0.2.1
[98e33af6] SimpleDirectMediaLayer v0.1.0
[276daf66] SpecialFunctions v0.7.2
[65254759] StatsMakie v0.0.2
[9a3f8284] Random