我的密码是:
func Test(websites []string) {
fmt.Print("test")
}
我使用gopy build
生成httpget.so
文件
然后,我尝试在Python代码中使用这个模块httpget.so
加载ans:
import httpget
print dir(httpget)
httpget.Test(["aaaa"])
但调用该函数会导致运行时的恐慌:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x1 pc=0x103998688]
goroutine 17 [running, locked to thread]:
main.cgo_func_httpget_Test(0x1)
/private/var/folders/yg/tx1wr1c5233fd299lpqnvjy40000gn/T/gopy-066392802/httpget.go:173 +0x18
goroutine 18 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 +0x1
我该如何解决这个问题?你知道吗
好的,我找到路了!!23333个
哥朗
在python中
相关问题 更多 >
编程相关推荐