【发布时间】:2020-08-08 18:26:42
【问题描述】:
我在我当前的 python 文件中导入了另一个 python 文件。当我从导入的 python 文件调用函数时,它显示Attribute Error: module 'abc' has no attribute 'classify'。如何解决这个问题?
app.py
import abc
a=abc.classify(upload)
abc.py
def classify(data):
app.logger.debug('Running classifier')
upload = data
image = load_image(upload)
#load_image() is to process image :
print('image ready')
请告诉我这里出了什么问题。我使用 python 版本 3.7.4。
【问题讨论】:
标签: python import attributeerror