[Tutor] Fwd: uploading images in pygame
Alan Gauld
alan.gauld at yahoo.co.uk
Wed Apr 17 11:11:21 EDT 2019
On 17/04/2019 10:14, fatima butt wrote:
> the python version is 3.7.3
> computer is acer SWIFT
> The error I get is following:
> Traceback (most recent call last):
> File "C:\Users\ammah\OneDrive\Documents\project1\myCode.py.py
> <http://mycode.py.py/>", line 84, in <module>
> background = pygame.image.load(path.join(img_dir,"ship1.jpg")).convert()
> pygame.error: Couldn't open
> C:\Users\ammah\OneDrive\Documents\project1\ship1.jpg
In addition to checking that the file exists in that location
you should also check the permissions to make sure you are
allowed to open it.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list