tiler
tiler copied to clipboard
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
File "tiler.py", line 223, in
Did you pass arguments to the script?
You have two ways you can use: python tiler.py path/to/image path/to/tiles_folder/
, or python tiler.py
and setting the image and the tiles paths in the conf.py file.
IMAGE_TO_TILE = 'images/'
folder with tiles (ignored if passed as the 2nd arg)
TILES_FOLDER = 'tiles/minecraft' Can i set it like thisοΌ
IMAGE_TO_TILE
must be an image (ex: IMAGE_TO_TILE = 'some_image.png'
) and not a folder. The TILES_FOLDER
looks correct.
D:\tiler>python tiler.py D:\tiler\images\cake_at_simple.png D:\tiler
Loading tiles
0%| | 0/11 [00:00<?, ?it/s]
Traceback (most recent call last):
File "tiler.py", line 223, in
where is the problemοΌ guys
The second argument must be a folder with just the tiles. D:\tiler
must have other types of files.
Try D:\tiler\tiles\times\gen_times\
.
thank you very much
Also, check if there are hidden files in the "D:\tiler" folder which are not image types.
I looked at what the people wrote above, and I found that I wrote my address right, no other files, and ran at first, but then still reported the same error.where is the problemοΌ
(base) D:\idea\tiler>python tiler.py ./photo/gen_Lemo ./tiles/lego/gen_lego_h/
Loading tiles
100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 125/125 [00:05<00:00, 24.91it/s]
Getting and processing boxes
Traceback (most recent call last):
File "D:\idea\tiler\tiler.py", line 223, in <module>
main()
File "D:\idea\tiler\tiler.py", line 217, in main
boxes, original_res = get_processed_image_boxes(image_path, tiles)
File "D:\idea\tiler\tiler.py", line 151, in get_processed_image_boxes
img = read_image(image_path)
File "D:\idea\tiler\tiler.py", line 34, in read_image
if img.shape[2] == 3:
AttributeError: 'NoneType' object has no attribute 'shape'
I know where I m wrongοΌI used my gen_file.Thanks to open source.