'Yet another (Probably SUPER IMPLE) Issue Python with Pillow for Image Generation
Once again I am trying to learn from mistakes and probably looking WAY to deep into this issue...
I've been building an NFT Project and have My Data list in a .CSV file (This file explains how to use each asset to build one complete photo) I'm running into an issue where I'm getting this error... errno2 File or Directory Not Found:
This is My Code where the error is coming from.
def checkIfExists(checkRow):
aData = pd.read_csv('adalist.csv')
index_list = aData[(aData['Background'] == checkRow[2])
& (aData['Accessories'] == checkRow[3]) &
(aData['Head'] == checkRow[4]) &
(aData['Hat'] == checkRow[5]) &
(aData['Body'] == checkRow[6]) &
(aData['Chest'] == checkRow[7]) &
(aData['Arms'] == checkRow[8]) &
(aData['Face'] == checkRow[9])].index.tolist()
if index_list == []:
return False
else:
return True
def createTvImage(arrayIN):
FILENAME = arrayIN[0]
NO = arrayIN[1]
BACKGROUND = arrayIN[2]
ACCESSORIES = arrayIN[3]
HEAD = arrayIN[4]
HAT = arrayIN[5]
BODY = arrayIN[6]
CHEST = arrayIN[7]
ARMS = arrayIN[8]
FACE = arrayIN[9]
print(NO,BACKGROUND,BODY,HEAD,ACCESSORIES)
baseTv = Image.open("Sources/Background" + ".png")
df = pd.read_csv('adalist.csv')
rowCount = df["NO"].count()
print("Number of Rows Is:" + str(rowCount))
ourRow = df.iloc[0]
createTvImage(ourRow)
I have made sure I'm in the Projects working Directory and all Folders are within the scope of the Directory
I'm either Totally missing something or Severely misunderstanding how the "Working Directory" works.. Thanks a ton StackOverflow! Feel Free to Roast This Python Newb that is learning as I go. edit I Have also Tried using the FULL Path C:\Users\JM Developer\Desktop\ADA Tv\Sources with no luck (I'm aware to change them to /
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
