-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
get_excel_hwnds throws an error in case no Excel application is running #269
Comments
I can't duplicate that. Can you check in the Task Manager if you have some Zombie Excel processes running when you get this? |
Also, what's the exact error message you're seeing? |
When I have an excel process (normal but also just zombie), I do not have On Tuesday, October 20, 2015, Felix Zumstein notifications@github.com
|
What versions of Excel/Python/Windows are you using? |
Excel 2007/2.7/xp On Tuesday, October 20, 2015, Felix Zumstein notifications@github.com
|
ooh xp is a tough one ,-) |
Error code = 2 "The system cannot find the file specified." On Tuesday, October 20, 2015, Felix Zumstein notifications@github.com
|
When you try to reproduce it manually, does it happen when you run |
I did not try anything else than running nosetests... On Tuesday, October 20, 2015, Felix Zumstein notifications@github.com
|
sure but if the tests are responsible for making it fail then I'd rather fix the tests than the library itself. |
except if the test uses xlwings in a non "approved/orthodox" way, I would rather think the test has found a bug that need to be fixed ;-) The traceback is the following
And I have printed the hwnd and the GetWindowText(hwnd)
When running just the script
I get the same error
So I wonder if the proper way to use FindWindowEx is both to check the output and to catch exceptions ... but I must say I can't find a lot of doc on this on google. |
fixed by d2d3f95 |
While running nosetests, I get errors if no Excel is open when starting the tests.
Some debugging led me to an issue in the get_excel_hwnds function. The function win32gui.FindWindowEx is used in a if construct but in fact the function throws a pywintypes.error when it fails. I think the function should instead be
The text was updated successfully, but these errors were encountered: