PyError when using PyCall

I have been attempting to do video analysis using python’s hnccorr algorithm. The particular script thats throwing this error use to work, though when it was handed off to me it started throwing this error which thus far I have been unable to figure out how to fix.

I have done complete updates on all languages and done reinstalls on the packages being used to see if it was something to do with older versions, none of that proved fruitful. I have also attempted this script on Windows, Linux and Mac. Both Linux and Mac throw this error, while the windows machine just never stops running almost like its stuck somewhere.

If anyone has seen this, or has any clever way of solving it on any of the above operating systems I would appreciate the help.

PyError ($(Expr(:escape, :(ccall(#= /Users/user/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'BlockingIOError'>
BlockingIOError(35, 'write could not complete without blocking', 114)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/hnccorr/base.py", line 230, in segment
    print(

Stacktrace:
  [1] pyerr_check
    @ ~/.julia/packages/PyCall/7a7w0/src/exception.jl:62 [inlined]
  [2] pyerr_check
    @ ~/.julia/packages/PyCall/7a7w0/src/exception.jl:66 [inlined]
  [3] _handle_error(msg::String)
    @ PyCall ~/.julia/packages/PyCall/7a7w0/src/exception.jl:83
  [4] macro expansion
    @ ~/.julia/packages/PyCall/7a7w0/src/exception.jl:97 [inlined]
  [5] #107
    @ ~/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:43 [inlined]
  [6] disable_sigint
    @ ./c.jl:458 [inlined]
  [7] __pycall!
    @ ~/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:42 [inlined]
  [8] _pycall!(ret::PyObject, o::PyObject, args::Tuple{PyObject}, nargs::Int64, kw::Ptr{Nothing})
    @ PyCall ~/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:29
  [9] _pycall!
    @ ~/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:11 [inlined]
 [10] #_#114
    @ ~/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:86 [inlined]
 [11] (::PyObject)(args::PyObject)
    @ PyCall ~/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:86
 [12] segment(name::String, framepath::String; kwargs::Base.Pairs{Symbol, Real, NTuple{4, Symbol}, NamedTuple{(:postprocessor_min_cell_size, :postprocessor_max_cell_size, :postprocessor_preferred_cell_size, :percentage_of_seeds), Tuple{Int64, Int64, Int64, Float64}}})
    @ Main ~/Desktop/user/filepath:12
 [13] top-level scope
    @ ./timing.jl:220 [inlined]
 [14] top-level scope
    @ ./In[7]:0
 [15] eval
    @ ./boot.jl:373 [inlined]
 [16] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:1196 

The issue appears to be an error thrown from Python: see

Hello jd-foster,

Thank you for looking into it. We ended up finding that a print statement within the python package was causing the blocking error, once it was removed the code ran smoothly.