-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error during Module initialization #131
Comments
I've occasionally had the same issue locally, but it seemed to occur at random - restarting Julia always fixed it. PythonCall is always loaded from a package though, so Do you have a way to reproduce this reliably? |
I guess I should really be using |
TL;DR: I think this issue may affect every chained dependecy in the form Yes, indeed. I should've made this explict but I was in a hurry. The problem showed up in two situations and I guess it has to do with caching of some sort. The first one happens randomly when the environment was clean and the project is built for the first time. The reliable situation happens when using PythonCall on the innermost package on a Summary:
I've just solved it by building and testing |
I think this happens because from When running locally this can be fixed by running again but keeping this will mess with many CI workflows around. |
Interesting! Anyway I've fixed this on the main branch now, using |
I'm currently using PythonCall within a new Julia package. The environment is configured according to the docs. Indeed, PythonCall is was added as a dependency, CondaPkg.toml is present and so on.
Locally it works like a charm, but during standard Julia CI it fails to initialize due to
pathof(PythonCall)
returningnothing
. It then triggers a Method Error by callingdirname(::Nothing)
. In fact, according topathof
's docs:I'm not really certain about
init_juliacall
semantics, but I think this is a corner case to be addressed.https://github.com/cjdoris/PythonCall.jl/blob/d193f567c6a4ddde84ecb0ca3a9a36c8335820d1/src/juliacall.jl#L20
Also, any tips or workarounds are appreciated!
The text was updated successfully, but these errors were encountered: