Closed KoderKumar closed 4 years ago
Does the folder ./tiles/minecraft
contain only images?
yes
Add this line to the function read_image
(line 33): print(path)
and check the file where it fails.
It is giving me this error:
File "C:\Users\VVA\Videos\ForYoutube\Python\MinecraftArt\tiler\tiler.py", line 224, in <module> main() File "C:\Users\VVA\Videos\ForYoutube\Python\MinecraftArt\tiler\tiler.py", line 207, in main tiles_paths = conf.TILES_FOLDER.split(' ') AttributeError: 'NoneType' object has no attribute 'split'
are you going to help?
You didn't pass the tiles folder as argument. You either have to run python tiler.py <image_to_tile> <folder_with_tiles>
or set those variables in the conf.py
file.
i passed
The program only uses the tiles folder from the conf.py
file if there isn't enough arguments:
if len(sys.argv) > 2:
tiles_paths = sys.argv[2:]
else:
tiles_paths = conf.TILES_FOLDER.split(' ')
Show me the exact command you entered.
I was passing 3 arugments
and conf.py was corrupted, So i reinstall the package
This is the error python tiler.py ./images/logo.png ./tiles/minecraft Loading tiles 99%|████████████████████████████████▊| 150/151 [00:52<00:00, 2.96it/s]Traceback (most recent call last): File "tiler.py", line 223, in
main()
File "tiler.py", line 216, in main
tiles = load_tiles(tiles_paths)
File "tiler.py", line 85, in load_tiles
tile = read_image(os.path.join(path, tile_name))
File "tiler.py", line 34, in read_image
if img.shape[2] == 3:
AttributeError: 'NoneType' object has no attribute 'shape'
99%|████████████████████████████████▊| 150/151 [00:52<00:00, 2.85it/s]