Replies: 1 comment
-
This is COM throwing the error because it has strict rules around threading - ie, this is a support request, so you need to follow the instructions you quoted at the top of your issue.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Expected behavior and actual behavior.
I want to call MyOle in different threads...
The second myOle.call1 will throw an exception: args:(-2147417827, 'The marshaled inter...n format.', None, None)
Steps to reproduce the problem.
In the main.py:
`
class My_HTTPServer_RequestHandler(BaseHTTPRequestHandler):
def do_POST(self):
self.callFoo()
def callFoo(self):
myOle = MyOleWrapper()
myOle.create()
myOle.call1()
# This will throw an exception
myOle.call1()
def run():
server_address = ('', 80)
httpd = ThreadingHTTPServer(server_address,My_HTTPServer_RequestHandler)
try:
httpd.serve_forever()
except KeyboardInterrupt:
pass
httpd.server_close()
if name == "main":
run()
`
In MyOleWrapper.py
`
from win32com import client
import pythoncom
class MyOleWrapper():
`
python: 3.7.3
pywin32: 223
Beta Was this translation helpful? Give feedback.
All reactions