-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Could not see any files in the explorer... #3607
-
Dear:
I have set up everything for code-server, and opened it in safari, but it could not show any files in the explorer.
I checked the code-server.log
, it showed:
[node.js fs] readdir with filetypes failed with error: [Error: EPERM: operation not permitted, scandir '/Users/name/Desktop/mitStudy/Courses/Network Security/python_courses/Personal'] {
errno: -1,
code: 'EPERM',
syscall: 'scandir',
path: '/Users/name/Desktop/mit/Study/Courses/Network Security/python_courses/Personal'
}
anyone can help please? thanks.
Best regards
Mike
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 1
Replies: 1 comment 17 replies
-
Hmm...it looks like it wasn't able to read your directories due to permissions? Where is code-server running and how did you install it?
Beta Was this translation helpful? Give feedback.
All reactions
-
You don't need to escape the space, the quote marks in the ls
command handle it for you!
This is strange though. It looks like you have permissions to the directory. Are you able to create files from the terminal there? For example:
cd "/Users/mike/Desktop/MT/Study/Courses/Network Security/python_courses/Personal" touch test
If that works, try:
code-server "/Users/mike/Desktop/MT/Study/Courses/Network Security/python_courses/Personal"
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
Dear:
Are you able to create files from the terminal there?
I have tried: cd "/Users/mike/Desktop/MT/Study/Courses/Network Security/python_courses/Personal" touch test
and it showed me nothing, but when I go to Mac finder, I can see that the files are created
.
截屏2021年06月22日 18 58 44
Then I have tried: code-server "/Users/mike/Desktop/MT/Study/Courses/Network Security/python_courses/Personal"
, it showed me:
(base) YEMBP:Personal mike$ code-server "/Users/mike/Desktop/MT/Study/Courses/Network Security/python_courses/Personal"
[2021年06月21日T19:20:43.657Z] info code-server 3.10.2 387b12ef4ca404ffd39d84834e1f0776e9e3c005
[2021年06月21日T19:20:43.658Z] info Using user-data-dir ~/.local/share/code-server
[2021年06月21日T19:20:43.669Z] info Using config file ~/.config/code-server/config.yaml
[2021年06月21日T19:20:43.669Z] info HTTP server listening on http://192.168.1.175:8080
[2021年06月21日T19:20:43.669Z] info - Authentication is enabled
[2021年06月21日T19:20:43.669Z] info - Using password from ~/.config/code-server/config.yaml
[2021年06月21日T19:20:43.669Z] info - Not serving HTTPS
[IPC Library: Pty Host] INFO Persistent process "2": Replaying 219 chars and 1 size events
Many thanks,
Best regards,
Mike
Beta Was this translation helpful? Give feedback.
All reactions
-
And one more question here, how I can run the code I write from
code-server web
?
You should be able to open that folder in code-server, open the Integrated Terminal and then run python hello.py
Beta Was this translation helpful? Give feedback.
All reactions
-
Dear:
open that folder in code-server
I have done this and tried both python hello.py
and python3 hello.py
, but none of them worked, they showed: can't open file 'hello.py': [Errno 2] No such file or directory
.
And unfortunately when I writing the message, code-server web stoped working again(could not see anything again), so I tried above thing in vscode locally.
So I am think to escape the space
from Network Security
, make it into Network_Security
. Should I change it in macOS files system
or change it in VScode
?
Many thanks,
Best regards,
Mike
Beta Was this translation helpful? Give feedback.
All reactions
-
have done this and tried both
From the screenshot it looks like you're Terminal is in a different folder than hello.py
is in? Which is why that wouldn't work. You need to cd
into that folder. Looks like from the file explorer you're in yt222ar_assign1
but the terminal is in Courses
? Hard to tell.
Inside terminal, run pwd
to see the working directory. If it shows yt222ar_assign1
then you are in the right place and can run python hello.py
. If it isn't, then you need to cd
into that directory and then you can run python hello.py
.
Should I change it in macOS files system or change it in VScode
Either works! I would use whatever you're more comfortable with!
Beta Was this translation helpful? Give feedback.