Skip to content

Error not signaled when cannot run Python process #25

@mistalloc1

Description

@mistalloc1

I'm on Fedora 30 with SBCL 1.4.14-2.fc30. I have python3, but no python (Python 2). Initially I couldn't import any modules because of cryptic end of file on #<SB-SYS:FD-STREAM for "descriptor 23" {1003824B03}> [Condition of type END-OF-FILE] errors, but by digging through the code I discovered I'm supposed to setf py4cl:*python-command* to python3. Now it works great.

I also see that python-start-if-not-alive should've signalled a better error in my case. I think the problem is because the (python-alive-p) check happens when bash, or whatever, is still busy failing. This works:

(defun python-start-if-not-alive ()
    "If no python process is running, tries to start it.
  If still not alive, raises a condition."
    (unless (python-alive-p)
      (python-start))
    (sleep 1) ; give the process some time to fail
    (unless (python-alive-p)
      (error "Could not start python process")))

Sadly I don't know how to fix it in a sane way.

I also think the error here could suggest checking your py4cl:*python-command* for a probable cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions