0
Problem with opening a file from the phone directory
file=open('/storage/sdcard1/Dcoder/classfunc.txt',"r") Traceback (most recent call last): File "source_file.py", line 1, in <module> file=open('/storage/sdcard1/Dcoder/classfunc.txt',"r") FileNotFoundError: [Errno 2] No such file or directory: '/storage/sdcard1/Dcoder/classfunc.txt'
9 Respostas
+ 8
well if you're using Sololearn's code playground, it's impossible, as it would only allow you in one folder on their server for one code run.
outside of Sololearn, I think you would need a longer more specific path. like c:// if you were on windows, but I'm not sure what the android equivalent is
also! put a r behind the path! like this:
r"thing/storage/foxpics/ahri.png"
+ 6
k well read the outside of Sololearn part. good luck!
+ 6
I did. Put on some glasses.
+ 6
yes, so follow what I said after: make sure its the full path, and make sure r is before the path string so it interprets it as raw and ignores /'s
if that doesn't work then I dunno.
+ 1
thank you , fox
0
Im using Dcoder
0
I understood! I have several compilers on my phone. Some of them use the Internet to execute commands, and some do not. Compilers that do not use the Internet can work with the directory of the phone
0
Pyonic can work
- 1
but what i have to do you didnt say!