Pygame uploading file images

You’re missing a parenthesis, but you no longer need the path.join. Just write it as

img_dir = path.dirname(__file__)

That is, assuming your images do actually live one directory up from where your file is – I don’t know what your directory structure looks like.