Good Day,
I created a Python GUI with PAGE but when I closed it and tried to reopen it I get this error saying my image cannot be found in my project folder. However all the images are there. Please find attached screenshots of the issue.
Good morning.
PAGE on Windows has a VERY serious issues when using images. They MUST be in the same folder as the code or at least a sub folder of that folder.
According to your error1.png, PAGE is trying to tell you that it can't find the images which are located as the following...
az_jpg "../Users/FUNMISE ADEFILA/Pictures/az.JPG" \
azlogo_jpg "../Users/FUNMISE ADEFILA/Pictures/azlogo.JPG" \
Your error2.jpg shows the path as "Desktop/Group_A_project".
The error1.jpg shows the images are located at "C:/Users/ariel/OneDrive/Desktop/Group_A_project" .
Your development folder should look something like this...
In addition, under "normal" circumstances, jpg files are not supported by PAGE / Tkinter without support from the PIL library. Having the images in .png or .gif format works much better for those specified during design time. Using the PIL library, you can easily embed the files in the support module.
I hope this helps,
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-08-05
The images are in the same folder as the tcl file but I still get the same error. I also changed the paths:
set image_list { \
az_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/az.JPG" \
azlogo_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/azlogo.JPG" \
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Again, I suggest you convert the images to PNG format and try linking those into the code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-08-05
I converted the images to PNG format and updated the paths. But I still have the same issue
set image_list { \
az_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/az.PNG" \
azlogo_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/azlogo.PNG" \
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the delay in getting more information to you. I ended up being sick after speaking to Don. I should have known something was up when I wasn't able to come up with an answer.
PAGE projects should always be run from the development folder. This is true for all os versions of PAGE but especially true for Windows and for any projects involving graphic images.
DO NOT use the desktop shortcut to start PAGE. Instead, either use the command prompt (DOS Box) to navigate to the development folder or use the File Explorer to navigate there then use <ctrl> L to activate the address bar box then type "cmd". This will open a new command prompt window. From there, assuming your system has PAGE in the path statement, type "python3 c:\page\page.py" or possibly just "page.bat"</ctrl>
This information can be found in the PAGE documentation under Installation on Windows.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-08-13
Okay. Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good Day,
I created a Python GUI with PAGE but when I closed it and tried to reopen it I get this error saying my image cannot be found in my project folder. However all the images are there. Please find attached screenshots of the issue.
Good morning.
PAGE on Windows has a VERY serious issues when using images. They MUST be in the same folder as the code or at least a sub folder of that folder.
According to your error1.png, PAGE is trying to tell you that it can't find the images which are located as the following...
The error1.jpg shows the images are located at "C:/Users/ariel/OneDrive/Desktop/Group_A_project" .
Your development folder should look something like this...
DevelopmentFolder
| Group_A_project
| codefile.tcl
| codefile.py
| codefile_support.py
| images
| az.jpg
| azlogo.jpg
....
In addition, under "normal" circumstances, jpg files are not supported by PAGE / Tkinter without support from the PIL library. Having the images in .png or .gif format works much better for those specified during design time. Using the PIL library, you can easily embed the files in the support module.
I hope this helps,
Greg
The images are in the same folder as the tcl file but I still get the same error. I also changed the paths:
set image_list { \
az_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/az.JPG" \
azlogo_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/azlogo.JPG" \
}
Do the files actually end in "JPG" or "jpg"?
Again, I suggest you convert the images to PNG format and try linking those into the code.
I converted the images to PNG format and updated the paths. But I still have the same issue
set image_list { \
az_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/az.PNG" \
azlogo_jpg "C:/Users/ariel/OneDrive/Desktop/Group_A_project/azlogo.PNG" \
}
The only other thing that I can think of is the possibility that PAGE might be having an issue with the OneDrive pathing.
I will try to discuss this with Don today. In the mean time, you might try working the project from a local drive, not a OneDrive path.
I will update here as soon as I get Don's input.
Thank you
Sorry for the delay in getting more information to you. I ended up being sick after speaking to Don. I should have known something was up when I wasn't able to come up with an answer.
PAGE projects should always be run from the development folder. This is true for all os versions of PAGE but especially true for Windows and for any projects involving graphic images.
DO NOT use the desktop shortcut to start PAGE. Instead, either use the command prompt (DOS Box) to navigate to the development folder or use the File Explorer to navigate there then use <ctrl> L to activate the address bar box then type "cmd". This will open a new command prompt window. From there, assuming your system has PAGE in the path statement, type "python3 c:\page\page.py" or possibly just "page.bat"</ctrl>
This information can be found in the PAGE documentation under Installation on Windows.
Greg
Okay. Thank you