Skip to content

Unresolved envs in LOAD_PATH prevent PythonCall from being loaded #163

@MichaelHatherly

Description

@MichaelHatherly

If there are any environments in the LOAD_PATH that haven't yet been resolved then an error is thrown when the call to Pkg.dependencies() is made.

The line referenced below calls Pkg.dependencies():

for env in [proj; [p.source for p in values(Pkg.dependencies())]]

@cjdoris would it make sense to guard that call based on whether the environment has been resolved or not?

Related to that, on the line above:

Pkg.activate(proj; io = devnull)

each environment is Pkg.activated prior to calling Pkg.dependencies(). There is a method of dependencies that takes an EnvCache so it's not (I believe) required to activate everything in the load path for the operation that that code is doing.

I'm happy to take a look at making the fix if you're alright with the proposed changes?


This came up in PumasAI/QuartoNotebookRunner.jl#256 (comment). We are now using PythonCall to support having Python cells in our Quarto backend. Thanks for making that possible with your work here!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions