Loading ...

模板功能报错

Author: ooorrrggg, Created: 2021-06-04 15:23:15, Updated:

我测了一下模板功能: def SetParam1(p1): global param1 param1 = p1

def GetParam1(): Log(“param1:”, param1) return param1

ext.SetParam1 = SetParam1 ext.GetParam1 = GetParam1

结果报错:

Traceback (most recent call last): File “<string>”, line 1606, in Run File “<string>”, line 10, in <module> File “<string>”, line 2, in main AttributeError: ‘i1Iii1i1I’ object has no attribute ‘GetParam1’

请问,这是为什么呢?


More

小小梦 你上面都没有main函数呀,怎么报错在main函数。

ooorrrggg 好的

小小梦 检查是不是,引用这个模板的策略,没有勾选这个模板选项。

ooorrrggg 好的