JuliaPy / JuliaPy/PythonCall.jl

Weird behavior importing lists from python to Julia

Open
#341 9 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Julia
Stars
1.1k
Forks
86
Avg merge
1d 22h
Merged PRs (30d)
3

Description

**Affects:** JuliaCall

**Describe the bug**
I'm getting weird crashes when I transfer a list from Python to Julia. This does not happen with PyJulia. Minimum working example below.

```
>>> from juliacall import Main as jl
>>> jl.x = [1., 2.]
>>> jl.seval("show(x)")
Any["s", "h", "o", "w", "(", "x", ")"]

>>> jl.x = 1
>>> jl.seval("show(x)")
1

>>> from julia import Main
>>> Main.x = [1., 2.]
>>> Main.eval("show(x)")
[1.0, 2.0]
```
**Your system**
- Windows 11 Pro 22H2
- Julia 1.9.2; Python 3.11, JuliaCall 0.9.13

```
C:\Users\drood>pip list
Package Version
---------------- -------
fortls 2.13.0
json5 0.9.14
julia 0.6.1
juliacall 0.9.13
juliapkg 0.1.10
numpy 1.25.0
packaging 23.1
pip 23.2
psutil 5.9.5
semantic-version 2.10.0
setuptools 65.5.0
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.