# IOError: Couldn't find image - Not the Usual

**URL:** <https://discourse.psychopy.org/t/ioerror-couldnt-find-image-not-the-usual/8006>\
**Category:** Coding\
**Created:** [June 4, 2019, 1:54pm UTC](https://discourse.psychopy.org/t/ioerror-couldnt-find-image-not-the-usual/8006 "2019-06-04T13:54:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shahar\_Lahad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/shahar_lahad/32/4450_2.png) [@Shahar\_Lahad](https://discourse.psychopy.org/u/Shahar_Lahad)\
**Post date:** [June 4, 2019, 1:54pm UTC](https://discourse.psychopy.org/t/ioerror-couldnt-find-image-not-the-usual/8006/1 "2019-06-04T13:54:10Z")

</div>

\*\*\*\* please delete - I found the problem (empty line in the text file from which the images were loading)

Hello,  
Thank you for trying to help.

I am coding an experiment and the code is very long and complicated so I cant really post it here.  
In the relevant part the program should display 2 images on either side of the screen.  
Once in a while (I still cant figure out when) the program crashes with the following error which seem to be in the “backstage” of psychopy.

**I have checked many times the usual suspects:**

- The images are in fact in the same folder and in the correct path.
- There are no files with the same name or same folder name.
- There should be no reason for a .png.png kind of problems

The full error it raised:

File “G:/My Drive/Common lab folder/decision making/experiment\_april\_2019/June.py”, line 61, in display\_2stimulus  
pos=[0.5, 0]  
File “C:\Python27\lib\site-packages\psychopy\visual\image.py”, line 102, in **init**  
self.setImage(image, log=False)  
File “C:\Python27\lib\site-packages\psychopy\visual\image.py”, line 301, in setImage  
setAttribute(self, ‘image’, value, log)  
File “C:\Python27\lib\site-packages\psychopy\tools\attributetools.py”, line 141, in setAttribute  
setattr(self, attrib, value)  
File “C:\Python27\lib\site-packages\psychopy\tools\attributetools.py”, line 32, in **set**  
newValue = self.func(obj, value)  
File “C:\Python27\lib\site-packages\psychopy\visual\image.py”, line 288, in image  
forcePOW2=False)  
File “C:\Python27\lib\site-packages\psychopy\visual\basevisual.py”, line 814, in \_createTexture  
raise IOError(msg % (tex, os.path.abspath(tex)))  
IOError: Couldn’t find image ; check path? (tried: G:\My Drive\Common lab folder\decision making\experiment\_april\_2019)

Thank you in advance,  
Shahar

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [June 5, 2019, 2:55pm UTC](https://discourse.psychopy.org/t/ioerror-couldnt-find-image-not-the-usual/8006/2 "2019-06-05T14:55:26Z")

</div>

Hi @Shahar_Lahad, glad you found the solution. It will be useful to keep this up for other users who might experience the same issue, if that is ok.

---

<div class="post-metadata">

**Author:** ![Shahar\_Lahad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/shahar_lahad/32/4450_2.png) [@Shahar\_Lahad](https://discourse.psychopy.org/u/Shahar_Lahad)\
**Post date:** [June 6, 2019, 3:46pm UTC](https://discourse.psychopy.org/t/ioerror-couldnt-find-image-not-the-usual/8006/3 "2019-06-06T15:46:02Z")

</div>

I loaded the images from a text file which contained an empty line at the end so once in while the program loaded an empty line and assigned it to what was suppose to be an image.
