TypeError:'str'对象不可调用错误

时间:2014-10-09 23:52:01

标签: python robot

我收到此错误并且不明白为什么!任何人的想法?

TypeError: 'str' object is not callable

这是我的代码。

import math
from lib import *
from test import *

hostCal = (int((200 * 0.7) / 10))

基本上我的要求是我只想将float值转换为整数。当我执行.py文件时它工作正常,但是当我将.py文件导入Robot时我得到了上述错误。

1 个答案:

答案 0 :(得分:4)

您的lib模块或test模块包含名称int与字符串值的绑定。

(故事的道德:避免from <module> import *!)

相关问题