Forum Discussion
8 Replies
- Marsha_RChampion Level 3
What are you trying to accomplish here?
What exact steps did you take and where did the failure occur?
A Google search for "could not import win32com.client turned up a lot of information regarding Python. Is that what you are trying to work with?
- Mel1Occasional Contributor
Hi,
Here is the thing;
I'm working with the windows Task scheduler using python in TestComplete.
In order for me to do that I need to import win32com.client and win32 in the script.
The modules(win32com.client and win32) have been copied to the TC path.
But still I get this error message.
Error: "Could not import win32Com"
Any idea why I get this error?
Thanks
- tristaanogreEsteemed Contributor
Hrm... win32com and win32... 32-bit, right?
TestComplete 12.4x and above, when you install it, makes all shortcuts point to the 64-bit version. Could this be a bit-wise problem?
Try going to C:\Program Files (x86)\SmartBear\TestComplete 12\bin\ and run the TestComplete.exe that you find there and see if things work better.
In the meantime, try being explicit in the path as per https://support.smartbear.com/testcomplete/docs/scripting/specifics/python.html#importing-packages
- AlexKarasChampion Level 3
- Mel1Occasional Contributor
Well, I have tried both the steps but still it didn't work.
I get a new error message though.
error: 'No module named win32api'
Regards
- AlexKarasChampion Level 3
Hi,
Not been an expert with Python I may just guess that this is some required dependent module that is absent.
P.S. And one more piece of advice from baxatob might help: https://community.smartbear.com/t5/TestComplete-General-Discussions/Unable-read-excel-file-with-xlrd-package/m-p/161689#M29858
- Mel1Occasional Contributor
Oh no worries thank you Alex and Tristaanogre.
Appreciate your help.
Regards
- AlexKarasChampion Level 3
Hi,
So... Is the problem solved or not? If it is, short description here might help others because the questions of how to add some third-party Python module to TestComplete runtime pop up in the Community quite often and advice from baxatob seem to be most helpful so far...