Skip to content

vscode - Internal Error: File to read not found or unreadable #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
almahdi404 opened this issue Mar 1, 2022 · 3 comments
Closed

vscode - Internal Error: File to read not found or unreadable #378

almahdi404 opened this issue Mar 1, 2022 · 3 comments

Comments

@almahdi404
Copy link

almahdi404 commented Mar 1, 2022

I am using the watchdog library to watch when a .scss file is closed. Then compile the whole directory, like this

sass.compile(
    dirname("static", "static"),
    output_style="expanded",
)

But when I am editing sass files using vscode, sometimes this error occurs
sass.CompileError: Internal Error: File to read not found or unreadable: E:/projects/blog/core/static/core/style.scss

How can I solve this problem?

@almahdi404 almahdi404 changed the title Internal Error: File to read not found or unreadable vscode - Internal Error: File to read not found or unreadable Mar 1, 2022
@asottile
Copy link
Member

asottile commented Mar 1, 2022

can you provide more information? that call doesn't look like our library and perhaps with a stacktrace it would be more apparent?

@almahdi404
Copy link
Author

thanks for the reply.

I didn't find this error when I am editing .sass files using notepad on windows.
Clearly vscode is causing the problem. Check these issues microsoft/vscode#15111, microsoft/vscode#28927. This microsoft/vscode#15111 (comment) says that Atomic save is causing this problem.

node-sass also had such unreadable file error issues sass/node-sass#1894, sass/node-sass#1894 with vscode. I don't know If they fixed this problem. But someone made a PR for this bug here sass/node-sass#2386

I think, It should make some retries before raising any error as like that PR did.

@asottile
Copy link
Member

asottile commented Mar 2, 2022

sounds like it's on vs code then!

@asottile asottile closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants