bendudson / py4cl

Call python from Common Lisp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recently occurring failure on Python 2

genelkim opened this issue · comments

When I to use py4cl with Python 2, specifically 2.7.15, I get the following error:

Python error: "name 'delete_numpy_pickle_arrays' is not defined"

Until a few weeks ago Python 2 was working fine. My guess is that this was introduced in this commit. The easiest way to replicate this seems to be loading py4cl/tests.

* (ql:quickload :py4cl)
To load "py4cl":
  Load 1 ASDF system:
    py4cl
; Loading "py4cl"

(:PY4CL)
* (ql:quickload :py4cl/tests)
To load "py4cl/tests":
  Load 1 ASDF system:
    py4cl/tests
; Loading "py4cl/tests"
To load "clunit":
  Install 1 Quicklisp release:
    clunit
Downloading http://beta.quicklisp.org/archive/clunit/2017-10-19/clunit-20171019-git.tgz
##########################################################################
; Loading "clunit"
[package clunit].........
To load "py4cl/tests":
  Load 1 ASDF system:
    py4cl/tests
; Loading "py4cl/tests"

; file: <filepath>
; in: PY4CL:IMPORT-MODULE "math"
;     (PY4CL:IMPORT-MODULE "math" :RELOAD T)
;
; caught ERROR:
;   (during macroexpansion of (PY4CL:IMPORT-MODULE "math" ...))
;   Python error: "name 'delete_numpy_pickle_arrays' is not defined"
[package py4cl/tests].....................
debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {10008B8083}>:
  COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "py4cl/tests" "tests">

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry
                                     compiling #<CL-SOURCE-FILE "py4cl/tests" "tests">.
  1: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "py4cl/tests" "tests">
                                     as having been successful.
  2:                                 Retry ASDF operation.
  3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  4:                                 Retry ASDF operation.
  5:                                 Retry ASDF operation after resetting the
                                     configuration.
  6: [ABORT                        ] Give up on "py4cl/tests"
  7:                                 Exit debugger, returning to top level.

(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "py4cl/tests" "tests">)))
   error finding frame source: Bogus form-number: the source file has probably
                               changed too much to cope with.
   source: NIL
0]

Thanks for reporting! Please confirm that it works now on your end; for me, it does work locally.

It seems to be working for me too. Thanks for handling this so quickly!