-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
juliacall.JuliaError: MethodError: Cannot convert
an object of type PythonCall.Py to an object of type Tuple
#183
Comments
Oh I need to update that example. The issue is this line: jl.Vector[jl.Tuple]([batch(100) for _ in range(2000)]) you need to do from juliacall import Main as jl, convert as jlconvert then replace that line with jlconvert(jl.Vector[jl.Tuple], [batch(100) for _ in range(2000)]) |
I made the changes, but now another alert appears:
|
I don't know what that error is, it works fine for me - check you haven't made a typo. I have fixed the example. |
Reading the alert carefully, it seems that the error comes from calling the loss function:
[my typo] by:
The expected results are obtained: |
Awesome 👍 |
Example 2: Calling Julia from Python
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
The text was updated successfully, but these errors were encountered: