Can't open/read file at Visual Studio
I'm having the following problem to read the .png file, where do i need to save it?
Hey Lucas,
Thank you for your question!
Please, make sure that the 'capstone_coins.png' file exists in the same folder as your Python script, namely 'capstone_solution.py'.
Let me know if the problem persists.
Kind regards,
365 Hristina
I have the same problem. I already have capstone_solution.py and capstone_coins.png in the same folder, but when I run the code it gives me that error and the image doesn't open.
Hey Alessandro,
Thank you for your comment!
Please, make sure that:
1. you are working in the capstone
environment you have created;
2. the imread()
functions on lines 4 and 5 (referring to the code above) take in as a first argument the full name of the image, exactly as it is named in the folder;
3. double check the image is indeed in the same folder as your python script .
Note: I have run the code from the screenshot above using PyCharm and the image appears as expected. There should be no issue with Visual Studio, or any other IDE.
Let me know if the problem persist and, if it does, please attach a screenshot of the code, the error message, and possibly the content of the folder you are working in, namely:
Kind regards,
365 Hristina