andrew-saydjari / CloudCovErr.jl

Pipeline for debiasing and improving error bar estimates for photometry on top of structured/filamentary background.
MIT License
6 stars 2 forks source link

crowdsource import failure #15

Open keflavich opened 2 years ago

keflavich commented 2 years ago

I ran into this issue: https://discourse.julialang.org/t/pycall-and-conda-inside-github-actions/70128/11

julia> using CloudCovErr
ERROR: InitError: PyError ($(Expr(:escape, :(ccall(#= /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:38 =# @pysym(:PyEval_EvalCode), PyPtr, (PyPtr, PyPtr, PyPtr), o, globals, locals))))) <class 'M
ModuleNotFoundError("No module named 'crowdsource'")
  File "/orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl", line 2, in <module>
    const Py_file_input = 257

Stacktrace:
  [1] pyerr_check
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:62 [inlined]
  [2] pyerr_check
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:66 [inlined]
  [3] _handle_error(msg::String)
    @ PyCall /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:83
  [4] macro expansion
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:97 [inlined]
  [5] #117
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:38 [inlined]
  [6] disable_sigint
    @ ./c.jl:458 [inlined]
  [7] pyeval_(s::String, globals::PyCall.PyDict{String, PyCall.PyObject, true}, locals::PyCall.PyDict{String, PyCall.PyObject, true}, input_type::Int64, fname::String)
    @ PyCall /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:37
  [8] macro expansion
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:230 [inlined]
  [9] __init__()
    @ CloudCovErr.decam /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/CloudCovErr/qq8dt/src/decam.jl:35
 [10] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:768
 [11] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:854
 [12] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1097
 [13] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
 [14] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
during initialization of module decam

julia>

The fix suggested in that thread doesn't seem to work:

$ PYTHON=~/.julia/conda/3/bin/python julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.3 (2022-05-06)
 _/ |\__'_|_|_|\__'_|  |  https://github.com/conda-forge/julia-feedstock
|__/                   |

julia> using CloudCovErr
ERROR: InitError: PyError ($(Expr(:escape, :(ccall(#= /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:38 =# @pysym(:PyEval_EvalCode), PyPtr, (PyPtr, PyPtr, PyPtr), o, globals, locals))))) <class 'M
ModuleNotFoundError("No module named 'crowdsource.psf'")
  File "/orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl", line 2, in <module>
    const Py_file_input = 257

Stacktrace:
  [1] pyerr_check
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:62 [inlined]
  [2] pyerr_check
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:66 [inlined]
  [3] _handle_error(msg::String)
    @ PyCall /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:83
  [4] macro expansion
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/exception.jl:97 [inlined]
  [5] #117
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:38 [inlined]
  [6] disable_sigint
    @ ./c.jl:458 [inlined]
  [7] pyeval_(s::String, globals::PyCall.PyDict{String, PyCall.PyObject, true}, locals::PyCall.PyDict{String, PyCall.PyObject, true}, input_type::Int64, fname::String)
    @ PyCall /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:37
  [8] macro expansion
    @ /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/PyCall/7a7w0/src/pyeval.jl:230 [inlined]
  [9] __init__()
    @ CloudCovErr.decam /orange/adamginsburg/miniconda3/envs/python39/share/julia/packages/CloudCovErr/qq8dt/src/decam.jl:35
 [10] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:768
 [11] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:854
 [12] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1097
 [13] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
 [14] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
during initialization of module decam

Any tips?

andrew-saydjari commented 2 years ago

Sorry for the delay. I am confused as to why the error changed. It looks like at first it cannot find the package, but then once you have given it the right path, it is having some python relative module load issues (which I have seen before, but had fixed).

I just ran the install Pkg.add("CloudCovErr") on a fresh machine/environment with a Rocky Linux 8 OS with no problems.

Can I get some more details to help me run this down? What OS are you on? Is this a local/remote machine?

keflavich commented 2 years ago

This is a remote machine running redhat Red Hat Enterprise Linux Server release 7.7 (Maipo). I installed julia using conda - which I guess is obvious from the paths.

What else would help?

andrew-saydjari commented 2 years ago

Oh gosh, I have never installed julia via conda. I suspect that is the issue. I load julia as its own module on my remote machine (or via dmg on my local machine) and work entirely within the julia environment. If you are willing to try a separate install of julia, I would love to know if that solves the problem... I can try the conda based install tomorrow and see if I can reproduce.

keflavich commented 12 months ago

my most recent retry maybe worked:

julia> import Pkg

julia> Pkg.add(url="https://github.com/andrew-saydjari/CloudCovErr.jl")

     Cloning git-repo `https://github.com/andrew-saydjari/CloudCovErr.jl`
    Updating git-repo `https://github.com/andrew-saydjari/CloudCovErr.jl`
    Updating registry at `/orange/adamginsburg/miniconda3/envs/python39/share/julia/registries/General.toml`
   Resolving package versions...
    Updating `/blue/adamginsburg/adamginsburg/miniconda3/envs/python39/share/julia/environments/python39/Project.toml`
  [06334dd7] ~ CloudCovErr v0.9.1 ⇒ v0.9.2 `https://github.com/andrew-saydjari/CloudCovErr.jl#main`
    Updating `/blue/adamginsburg/adamginsburg/miniconda3/envs/python39/share/julia/environments/python39/Manifest.toml`
  [06334dd7] ~ CloudCovErr v0.9.1 ⇒ v0.9.2 `https://github.com/andrew-saydjari/CloudCovErr.jl#main`
Precompiling project...
  1 dependency successfully precompiled in 18 seconds (173 already precompiled, 1 skipped during auto due to previous errors)

julia>

julia> using CloudCovErr

julia>