Python Forum
Need help importing stuff that python says it cant open
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help importing stuff that python says it cant open
#1
I type in the following: player = pygame.image.load("resources/image/dude.png") and it keeps on saying this : pygame.error: Couldn't open resources/image/dude.png and when i import curses it says the module doesn't exist but i go to pythons file and there curses is and with the image that i saved under pygames folder is correctly named
Please help! Thank you
Reply
#2
Should be in your program folder. The folder that you are running the game from.
in program.
from os import getcwd
print(getcwd()) # resources folder should be here
99 percent of computer problems exists between chair and keyboard.
Reply
#3
Thanks alot i moved the game from python folder to pygame folder.IT WORKS NOW. THANKS!!!!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python standard way of importing library mg24 1 872 Nov-15-2022, 01:41 AM
Last Post: deanhystad
  Run the code for some stuff it does not return me why Anldra12 3 2,797 Apr-19-2021, 02:01 PM
Last Post: Anldra12
  "Automate the Boring Stuff with Python" creating a path works but only for CMD promt Milos 2 2,821 Nov-28-2020, 01:08 PM
Last Post: Larz60+
  Unable to print stuff from while loop Nick1507 4 2,275 Sep-17-2020, 02:26 PM
Last Post: Nick1507
  importing a list of numbers into python script barrypyth 8 4,429 Aug-22-2020, 09:10 PM
Last Post: barrypyth
  Importing python data to Textfile or CSV yanDvator 0 1,720 Aug-02-2020, 06:58 AM
Last Post: yanDvator
  importing a CSV file into Python russoj5 1 2,917 Aug-02-2020, 12:03 AM
Last Post: scidam
  How Do I Install Stuff for Python? CopBlaster 6 3,132 May-08-2020, 12:27 PM
Last Post: hussainmujtaba
  Learning to have Class and doing stuff with it... bako 2 1,957 Apr-29-2020, 05:07 PM
Last Post: bako
  importing CSV file into a OOP Class table using Python faruk61 1 2,906 Apr-15-2020, 12:00 PM
Last Post: faruk61

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020