Skip to content
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

OSError: [Errno 22] Invalid argument #19

Closed
monovertex opened this issue Jul 31, 2018 · 4 comments · Fixed by #22
Closed

OSError: [Errno 22] Invalid argument #19

monovertex opened this issue Jul 31, 2018 · 4 comments · Fixed by #22

Comments

@monovertex
Copy link
Contributor

Hi, I'm getting the error in the title when trying to run Fix Imports.

It says it's coming from import-js.py, line 156, which is the stdin flush.

importjs works in CLI mode without any issue.

I'm on Windows 10. Not sure what any other information to provide right now. Any ideas?

@trotzig
Copy link
Contributor

trotzig commented Aug 13, 2018

Hi @monovertex, sorry for the late response. I haven't seen this issue before. Are you getting this consistently or just every now and then?

@monovertex
Copy link
Contributor Author

Don't worry @trotzig. After I opened the issue I also encountered it on Linux and also got it to work on Windows.

I think it happens when the importjsd process is blocked or killed. I experienced the issue when the command failed because I had some syntax errors in the importjs config, but also saw it when, in a larger project, the process hanged because of a large number of files (see Galooshi/import-js#510) and I had to kill it, because it blocked Sublime.

Basically, I think the plugin doesn't know to re-start the process if it's no longer up.

@trotzig
Copy link
Contributor

trotzig commented Aug 13, 2018

Basically, I think the plugin doesn't know to re-start the process if it's no longer up.

Having this type of monitoring would certainly make the tool more robust.

@monovertex
Copy link
Contributor Author

I'll give it a shot. I think this could be easily combined with the request in #1 to make the plugin async. With a polling loop, it would be easy to detect when the daemon dies and restart it.

trotzig added a commit that referenced this issue Aug 30, 2018
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

Successfully merging a pull request may close this issue.

2 participants