一、完整报错:
num = math.cell(photosListLength * 0.1)
AttributeError: module 'math' has no attribute 'cell'
二、部分代码:
import math
num = math.ceil(photosListLength * 0.1)
三、原因:
只导入了math模块,其中的ceil方法并没有导入
四、解决办法:
from math import ceil
num = ceil(photosListLength * 0.1)