-
-
Notifications
You must be signed in to change notification settings - Fork 524
Closed
Milestone
Description
There is a hard coded 1 minute timeout of starting python server process:
xlwings/src/xlwingsdll/config.cpp
Lines 479 to 503 in 14d0e56
| // now repeatedly try to create the Python interface object, waiting up to 1 minute to do it | |
| for(int k=0; k<600; k++) | |
| { | |
| // try to create the object | |
| hr = CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER, IID_IDispatch, (void**) &(this->pInterface)); | |
| if(hr != REGDB_E_CLASSNOTREG) | |
| break; | |
| // didn't create object - check that python process is still there! | |
| DWORD dwExitCode; | |
| if(0 == GetExitCodeProcess(pi.hProcess, &dwExitCode)) | |
| throw formatted_exception() << "GetExitCodeProcess failed: " << GetLastErrorMessage(); | |
| if(dwExitCode != STILL_ACTIVE) | |
| { | |
| formatted_exception e; | |
| e << "Python process exited before it was possible to create the interface object."; | |
| if(this->HasValue("RedirectOutput")) | |
| e << " Try consulting '" << this->GetValue("RedirectOutput") << "'."; | |
| e << "\n"; | |
| e << "Command: " << cmdLine << "\nWorking Dir: " << workingDir; | |
| throw e; | |
| } | |
| Sleep(100); | |
| } |
I have a python installation on a network drive. Sometimes, it can take more than 1 minute to start the python process due to network slowness. It would be nice if the timeout can be configured like other parameters, so that the timeout can be increased for use case like mine which expects long start up time.
Thanks.
p.s. This is a great project. Thank you so much for all your hard work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels