Writing and Reading files is not permanently
See original GitHub issueDescription
My application use json file to write some information, when i try in my IDE there is no problem. But when i transform the project in executable application
How to Reproduce
- Create project with a Json file
- Save text on file json
- Close application
- Reopen
- File Json was load at previous version
My Environment:
- Python version (
3.10.6
): - auto-py-to-exe version (
2.23.1
): - PyInstaller version (
5.4.1
): - Eel version (
0.14.0
):
Additional context
Test project -> TestIOReport
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
file.write() not permanently writing to file python - Stack Overflow
HOWEVER: When I run the script a second time, the output is exactly the same, and when I examine the text file, the...
Read more >Permanently setting files in the Documents folder to Read and ...
Whenever I go to edit the files, it says that they have been checked as read only.
Read more >Reading and Writing Files in Python (Guide) - Real Python
In most cases, upon termination of an application or script, a file will be closed eventually. However, there is no guarantee when exactly...
Read more >6.1. Reading and Writing Files — Runestone Interactive ...
When we open a file for writing, a new, empty file with that name is created and made ready to accept our data....
Read more >Reading and Writing Files With NodeJS - TutorialEdge.net
In this tutorial I'm going to be showing you exactly how we can read and write files on our local filesystem using NodeJS....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is a help post that is linked in the README, top of auto-py-to-exe and bottom of auto-py-to-exe after each build. In this post, I discuss The Difference Between One Directory and One File - I highly recommend you give that a read.
I believe you are trying to overwrite a file that is part of the initial bundle and are expecting it to stay modified after each run - this is not how one-file mode works. one-file mode unbundles on each run meaning all modified files within the bundles are reset (more about this in the post).
ok, ok sorry for the inconvenience, now I’ll try