【Python】使用tiler库报错AttributeError

AttributeError: ‘NoneType’ object has no attribute ‘split’

检查你的参数是否设置好

  • 图片路径完整
  • 不能带有中文
  • 转义特殊符号

在conf.py里设置

# GEN TILES CONFS

# number of divisions per color (R, G and B)
# DEPTH = 4 -> 4 * 4 * 4 = 64 colors
DEPTH = 4
# list of rotations, in degrees, to apply over the original image
ROTATIONS = [0]


#############################


# TILER CONFS

# number of colors per image
COLOR_DEPTH = 32
# tiles scales (1 = default resolution)
RESIZING_SCALES = [0.5, 0.4, 0.3, 0.2, 0.1]
# number of pixels shifted to create each box (tuple with (x,y))
# if value is None, shift will be done accordingly to tiles dimensions
PIXEL_SHIFT = (5, 5)
# if tiles can overlap
OVERLAP_TILES = False
# render image as its being built
RENDER = False
# multiprocessing pool size
POOL_SIZE = 4

# out file name
OUT = 'out.png'
# image to tile (ignored if passed as the 1st arg)
IMAGE_TO_TILE = r'D:\py\vs\jpg\fuukie.jpg'
# folder with tiles (ignored if passed as the 2nd arg)
TILES_FOLDER = r"C:\Users\Administrator\Downloads\clare_code-tiler-master\tiler\tiles\minecraft"

2.AttributeError: ‘NoneType’ object has no attribute ‘’

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值