image.open no such file or directory

47

import os.path

script_dir = os.path.dirname(os.path.abspath(__file__))

im = Image.open(os.path.join(script_dir, 'Desert.jpg'))

# OR

im = Image.open(os.path.join(script_dir, '../assets/Desert.jpg'))

Comments

Submit
0 Comments