Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygame.error: Couldn't open imgs\pipe.png (imgs folder is still there) python 3.7.6 #20

Closed
ostap-tymchenko opened this issue Oct 10, 2020 · 12 comments

Comments

@ostap-tymchenko
Copy link

ts/NEAT-Flappy-Bird/flappy_bird.py
pygame 2.0.0.dev6 (SDL 2.0.10, python 3.7.6)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "c:/Users/osty2/Documents/programing_projects/NEAT-Flappy-Bird/flappy_bird.py", line 28, in
pipe_img = pygame.transform.scale2x(pygame.image.load(os.path.join("imgs","pipe.png")).convert_alpha())
pygame.error: Couldn't open imgs\pipe.png
PS C:\Users\osty2\Documents\programing_projects>

VScode - direct clone.

Screenshot (342)
Screenshot (343)

@ostap-tymchenko
Copy link
Author

i'm a relatively new programer (i've only done this for a year) so im happy to take any criticism and i understand that i might have done something stupid and its most likely my fault. good luck i guess.

@ostap-tymchenko
Copy link
Author

Update: doesn't work in 3.8

@Aryankpoor
Copy link

Aryankpoor commented Oct 13, 2020

It is working in 3.8.6 and 3.9 for me
specs: windows 10 and vscode - version 1.47
There is no error showing like that for me, the game is working just fine

@Aryankpoor
Copy link

Btw I also checked it on repl.it and it works there also just fine,
Capture

@ostap-tymchenko
Copy link
Author

ostap-tymchenko commented Oct 13, 2020

well im windows 10 vs code and python 3.8.6 but that wasn't the problem. i was running it from a folder and it was trying to pull from the base there instead of the file for this. the repl link works but its very slow so im looking to run it locally.

@ostap-tymchenko
Copy link
Author

the new issue im having is the same as here (none of the solutions work for me) im trying other things and looking for more sources but any help is apreciated.

@ostap-tymchenko
Copy link
Author

fixed it, use command pip install neat-python==0.9 (windows cmd)

@Aryankpoor
Copy link

well im windows 10 vs code and python 3.8.6 but that wasn't the problem. i was running it from a folder and it was trying to pull from the base there instead of the file for this. the repl link works but its very slow so im looking to run it locally.

Yeah in repl.it the game was very-very slow

@ostap-tymchenko
Copy link
Author

by the way how do you get the output of this to be in a terminal? like the gen statistics?

@Aryankpoor
Copy link

Aryankpoor commented Oct 14, 2020

That is not the terminal , that is reply.it, and btw just for info I do not use terminal, I run it in interactive python when I use vscode, it is better that way you know

@ostap-tymchenko
Copy link
Author

like jupiter notebook? i guess for testing but not writing.

@anuragvalechha
Copy link

i m having the same error help me to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants