You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, my aim is to be able to load certain assets in memory with multiple goroutines for speed/performance and once an asset is loaded into memory I would like to call a callback function that would be passed from python.
i.e:
Have a golang function that loads assets/files into memory
This function is built into the python module, thus I can call it from python and additionally pass callback functions to it
Assets are loaded in multiple goroutines
Every time an asset is loaded, call a callback function, which was passed to the import function
What am I doing wrong?
I get the following error when trying to build my package:
gopy: only one function signature arg allowed
$ ./build_importer.sh
go build -v importer
--- Processing package: importer ---
ignoring python incompatible method: importer.func (*importer.Importer).ImportIBSP(assetPath string, filePath string, poolSize uint, callbackIbsp func(importer.LoadedIBSP), callbackMaterial func(importer.LoadedMaterial), callbackXmodel func(importer.LoadedModel)) error: func(assetPath string, filePath string, poolSize uint, callbackIbsp func(importer.LoadedIBSP), callbackMaterial func(importer.LoadedMaterial), callbackXmodel func(importer.LoadedModel)) error: gopy: only one function signature arg allowed: func(assetPath string, filePath string, poolSize uint, callbackIbsp func(importer.LoadedIBSP), callbackMaterial func(importer.LoadedMaterial), callbackXmodel func(importer.LoadedModel)) error
no LibDir -- copy from IncDir: C:/Users/soma/AppData/Local/Programs/Python/Python311/Include
no LibPy -- set to: python311
no LibDir -- copy from IncDir: C:/Users/soma/AppData/Local/Programs/Python/Python311/Include
no LibPy -- set to: python311
--- building package ---
gopy.exe build -output=importer -vm=python importer
goimports -w importer.go
no LibDir -- copy from IncDir: C:/Users/soma/AppData/Local/Programs/Python/Python311/Include
no LibPy -- set to: python311
go build -mod=mod -buildmode=c-shared -o importer_go.pyd .
C:\Users\soma\AppData\Local\Programs\Python\Python311\python.exe build.py
Doing windows sed hack to fix declspec for PyInit
CGO_CFLAGS=-IC:/Users/soma/AppData/Local/Programs/Python/Python311/Include -fPIC -Ofast
CGO_LDFLAGS=-LC:/Users/soma/AppData/Local/Programs/Python/Python311/Include -lpython311
go build -mod=mod -buildmode=c-shared -o _importer.cp311-win_amd64.pyd .
this is the part of the code the error talks about:
If I only pass one callback function it doesn't throw the error. How could I solve this problem when I need to call multiple callback functions, depending on the type of asset loaded?
First of all, my aim is to be able to load certain assets in memory with multiple goroutines for speed/performance and once an asset is loaded into memory I would like to call a callback function that would be passed from python.
i.e:
What am I doing wrong?
I get the following error when trying to build my package:
gopy: only one function signature arg allowed
this is the part of the code the error talks about:
The text was updated successfully, but these errors were encountered: