py4cl2-cffi icon indicating copy to clipboard operation
py4cl2-cffi copied to clipboard

How are file Pointers passed

Open CL98K opened this issue 6 months ago • 2 comments

`* (py4cl2-cffi:import-module "pickle" :as "pkl") T

  • (with-open-file (stream "/mnt/d/Worker/Lisp/test/xx.plk" :element-type '(unsigned-byte 8)) (py4cl2-cffi:pycall "pkl.load" (sb-sys:fd-stream-fd stream)))

debugger invoked on a PY4CL2-CFFI:PYERROR in thread #<THREAD tid=53 "main thread" RUNNING {1001128093}>: A python error occurred: file must have 'read' and 'readline' attributes

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE-IGNORING-ERRORS] 1: [ABORT ] Exit debugger, returning to top level.

(PY4CL2-CFFI::PYTHON-MAY-BE-ERROR) source: (ERROR 'PYERROR :FORMAT-CONTROL "A python error occurred:~% ~A" :FORMAT-ARGUMENTS (LIST VALUE-STR))`

CL98K avatar Jan 06 '24 16:01 CL98K