Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

image.open no such file or directory

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'))
Comment

PREVIOUS NEXT
Code Example
Python :: django template add numbers 
Python :: ttk button 
Python :: create tables with psycopg2 python 
Python :: access myultiple dict values with list pythojn 
Python :: python community 
Python :: python read binary 
Python :: python spliting string into list 
Python :: insert list python 
Python :: download image from url 
Python :: select rows in python 
Python :: fibinacci python 
Python :: pyaduio linux 
Python :: celery timezone setting django 
Python :: python codes 
Python :: python remove duplicates from list of dict 
Python :: resize cmd using python 
Python :: how to rename files python 
Python :: python how to draw a circle 
Python :: pytest logcli to write to file 
Python :: how to append list in python 
Python :: create a python api 
Python :: python print function 
Python :: reading the JSON from a JSON file 
Python :: django model remove duplicates 
Python :: pandas series top 5 percent 
Python :: how to convert integer to binary string python 
Python :: muliline comment in pyhton 
Python :: random normal 
Python :: virtual env pyhton 
Python :: python suppress warnings in function 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =