JuliaPy / JuliaPy/PyCall.jl

Loading Binary pickle

Aperta
#179 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.5k
Fork
186
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello.
Thanks for this great library.
I am having troubles reading in pickled data serialized using protocol 1 or 2.
Here is a short snipped to reproduce:

```
a = [1:10]
fid = open("test.pickle","w")
pickle.dump(test, fid, 2)
close(fid)

fid = open("test.pickle","r")
data = pickle.load(PyTextIO(fid))
close(fid)
```

It works when I dump with protocol 0.
I can read the data in python.
I am using julia linux binaries 0.3.11 and PyCall 0.8.2.

I get the following error:

```
PyError (:PyObject_Call)
UnicodeDecodeError('utf8', '\x80', 0, 1, 'invalid start byte')

while loading In[81], in expression starting on line 8

in pyerr_check at /home/90days/ko/julia/v0.3/PyCall/src/exception.jl:58
in pycall at /home/90days/ko/julia/v0.3/PyCall/src/PyCall.jl:91
in fn at /home/90days/ko/julia/v0.3/PyCall/src/conversions.jl:188
```

I hope I am using it correctly. Would be great if that works, since protocol 1 or 2 are an order of magnitude faster than 0 in my case.
Thanks!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the supplied protocol 1 or 2 reproduction using Julia 0.3.11 and PyCall 0.8.2. Read the PyTextIO entry point and the referenced PyCall/src/conversions.jl and PyCall/src/exception.jl paths while tracing the UnicodeDecodeError. Done means the reported pickled data loads successfully without the UTF-8 decoding error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
julia, python
Ambito
backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.