Closed
Description
Example 2: Calling Julia from Python
Traceback (most recent call last):
File "F:/Python/Python Scripts/Python module JuliaCall/Example_2_Calling_Julia_from_Python.py", line 22, in <module>
jl.Vector[jl.Tuple]([batch(100) for _ in range(2000)]),
File "C:\Users\user\.julia\packages\PythonCall\4eoCM\src\jlwrap\any.jl", line 201, in __call__
return self._jl_callmethod($(pyjl_methodnum(pyjlany_call)), args, kwargs)
juliacall.JuliaError: MethodError: Cannot `convert` an object of type PythonCall.Py to an object of type Tuple
Closest candidates are:
convert(::Type{T}, !Matched::T) where T<:Tuple at c:\users\user\appdata\local\programs\julia-1.7.2\share\julia\base\essentials.jl:336
convert(::Type{T}, !Matched::Tuple{Vararg{Any, N}}) where {N, T<:Tuple} at c:\users\user\appdata\local\programs\julia-1.7.2\share\julia\base\essentials.jl:337
convert(::Type{T}, !Matched::CartesianIndex) where T<:Tuple at c:\users\user\appdata\local\programs\julia-1.7.2\share\julia\base\multidimensional.jl:137
julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: AMD Ryzen 7 5700X 8-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, znver3)
(@v1.7) pkg> st Flux
Status C:\Users\user\.julia\environments\v1.7\Project.toml
[587475ba] Flux v0.13.3
(@v1.7) pkg> st PyCall
Status C:\Users\user\.julia\environments\v1.7\Project.toml
[438e738f] PyCall v1.93.1
Installed Pythons found by C:\Windows\py.exe Launcher for Windows
-3.8-64 C:\Users\user\AppData\Local\Programs\Python\Python38\python.exe *
pip list
juliacall 0.9.0
pip freeze
juliacall==0.9.0