开发者社区> 问答> 正文

在Python程序中调用time.sleep异常报错:TypeError,对象不能调用,该如何处理?

在Python程序中调用time.sleep异常报错:TypeError,int对象不能调用,该如何处理? Traceback (most recent call last): File "crawler.py", line 17, in time.sleep(1) TypeError: 'int' object is not callable

image.png

展开
收起
5abyqn7wigzqm 2021-10-28 01:18:21 1801 0
1 条回答
写回答
取消 提交回答
  • 可能是引入的time对象不支持int参数类型,可以看一下API,作下类型转换处理

    2021-10-28 02:41:16
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载