importing of python module for simple-salesforce
Just documenting some painful process that TestComplete makes you do and hopefully others can learn from my mistakes.
Tl;dr: importing complex python module into TestComplete is unfortunately a waste of your time and you would be advised to use another product if you require to use packaged modules more easier without assistance
i have tried to import a python module for simple-salesforce which unfortunately for us has loads of other mandatory modules.
lets go thru some mistakes..
first mistake was to use whatever Python was present on the machine.
I had installed Python quite some time back and didnt make note of it and performed a install on the python simple-salesforce package. this was a mistake as I got errors with the module lxml where etree was failing
Python runtime error. ImportError: cannot import name 'etree' from 'lxml' (C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\Extensions\Python\Python311\Lib\lxml\__init__.py)
this was highly likely due to being on Python 3.12, so i downgraded my Python version.
next mistake was thinking i could copy the module folders one by one...nope dont do that. that is just a painstaking waste of your day. dont do me and copy one by oneā¦go to your Python site-packages location, and copy everything except for any of the .dist-info folders into the Local TestComplete location
when i was trying to copy copy the modules one my one, it would initially say what module was missing so would copy them after each error, but I was them stuck with the following error occuring and not knowing what to do
Python runtime error.
TypeError: NoneType takes no arguments
hence why i just copied all the modules across