holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
567 stars 34 forks source link

file.read and readlines() issues #236

Closed ObedH26 closed 2 years ago

ObedH26 commented 2 years ago

Hey , i recently updated my apps i didn't do since a while and im noticed that i cant use read and readlines method it always return an empty list and even in some case saying me i cant use the fonction or something like that thats pretty weird. I can still write in it normally. Also thanks for this awesome app this is very useful !

holzschu commented 2 years ago

Hi, I just ran a quick test, and it still works. I have an hypothesis: maybe the notebook is a directory outside of Carnets main directory ("On my iPad/Carnets").

In that case, the notebook cannot access files in its directory unless you grant permission with the unlock folder button. Permissions remain valid for a long time, but they expire after a time, and often when you update the app.

ObedH26 commented 2 years ago

Ohh i am sorry i think the problem was i was opening the file in a+ mode i didn't know you cant read with this or i forgot idk ^^ thank for your advice !

ObedH26 commented 2 years ago

Humm actually i just checked on google and the "a+" option should let me read and write on the file if i get the thing right, but i cant use read and readlines method so it look to me like an error, perhaps im getting it wrong that wouldn't surprise me