-
Notifications
You must be signed in to change notification settings - Fork 140
python3.PyImport_ImportModule(name) will emit a fatal error when called the second time. #29
Comments
Every thing is fine when |
I haven't looked at your code in detail, but one thing I've noticed is the absence of any |
It seems we could only |
Hello, do you have a solution to this problem? |
maybe as a starting point:
|
Describe what happened:
Environments:
On MacOS (Catalina Version 10.15.4)
Python3.7.6
Go1.13.8
I want to use go-python3 to invoke an algorithm written in Python3, but as described, an fatal error will generated when the second time I invoke this algorithm. From the output message, it seems that
PyImport_ImportModule
causes this error.Here is the sample code.
A wrapper of PyImport_ImportModule:
Each time the algorithm is called in a goroutine.
Sample caller like this:
go Calc("aaa.csv")
.Describe what you expected:
We can call go Calc() many times without a fatal error.
Steps to reproduce the issue:
Use the code above and environments above, put these code into a goroutine, like
go Calc("aaa.csv")
.For simplicity, you may just remove the algorithm part and just have the skeleton remained.The text was updated successfully, but these errors were encountered: