-
Notifications
You must be signed in to change notification settings - Fork 793
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
win32com/server/policy.py tries to call as string #1902
Comments
These kinds of issues are easily caught by type-checkers. I also noticed a couple more |
@mhammond It seems that during the transition to Python3, a lot of string error variables were left as strings, causing them to be called and raise
Fixing this will be necessary to enable the |
@mhammond I can fix this, but I'm not sure what your preferred approach would be. |
These are not exceptions we expect to actually hit or have people catch, so I'd be fine with one of I'm open to ideas though - WDYT? |
I think that's gonna have to be a case-by-case. First thing I noticed is that tests could simply use I noticed a few more that can sensibly be Others are actually unused. Most valid |
Of the 4 listed above, I don't see how any of them could reasonably be a pythoncom.error - what would the
Sorry, I only looked at those 4 quoted above. |
I meant |
Note that issues in this repository are only for bugs or feature requests in the pywin32.
If you need support or help using this package, please follow these instructions - support or help requests will be closed without comment.
For all bugs, please provide the following information.
https://github.com/mhammond/pywin32/blob/main/com/win32com/server/policy.py tries to call
error
which is a string.error
is defined atpywin32/com/win32com/server/policy.py
Line 103 in e1c0237
and there are 4 instances where it is called
pywin32/com/win32com/server/policy.py
Line 211 in e1c0237
pywin32/com/win32com/server/policy.py
Line 363 in e1c0237
pywin32/com/win32com/server/policy.py
Line 517 in e1c0237
pywin32/com/win32com/server/policy.py
Line 740 in e1c0237
Try to use a COM interface that does not exist.
program output:
The text was updated successfully, but these errors were encountered: