Closed phil1234567891011 closed 1 month ago
Hi @phil1234567891011 , is your OS windows 32 version?
Hi @phil1234567891011 , is your OS windows 32 version?
Hi, Windows Server 2022 Datacenter 64 bits
Robot Framework 6.1.1 (Python 3.9.2 on win32)
can you take a try with 64 bit python? https://www.python.org/ftp/python/3.9.2/amd64/
how can I use another version of python ? I use the robot.exe command
\UserData***\AppData\Roaming\Python\Python39
uninstall the 32bit \UserData\*******\AppData\Roaming\Python\Python39
, then install the amd64 version.
just checked, it seems I already use 64 bit version
Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.architecture()[0]
'64bit'
that error messages appears a lot in google, and nobody seems to have a solution for this while it is so easy to reproduce
it looks abnormal. I'll check further.
@lucyking Hi, do you have a solution? I have the same case I try to import
with this import:
Library AutoItLibrary
I have this error:
Initializing library 'AutoItLibrary' with no arguments failed: com_error: (-2147221164, ' Unregistered class', None, None)
as for me I use pywinauto and win32gui, I gave up on this a while ago
I've go the same issue. Strangely when I install robotframework.autoitlibrary it install the 32bits library instead of the 64bits. To fix it manually you can do this workaround : unzip the package robotframework-autoitlibrary-1.2.8 (for instance), you will find a folder 3rdPartyTools\AutoIt\lib64 where there is the dll AutoItX3.dll.
-> unregister the 32bits DLL : regsvr32.exe /U "your library location\site-packages\RobotFramework\Extensions\AutoItLibrary\AutoItX3.dll"
-> copy AutoItX3.dll into your library location\site-packages\RobotFramework\Extensions\AutoItLibrary\AutoItX3.dll
-> register the 64bits DLL : regsvr32.exe "your library location\site-packages\RobotFramework\Extensions\AutoItLibrary\AutoItX3.dll"
gave up on this a long time ago, nobody is looking at it anyway
@joel-bgl many thanks for your debug info. @phil1234567891011 I will try to fix this issue asap.
still seeing this issue
@joel-bgl many thanks for your debug info. @phil1234567891011 I will try to fix this issue asap.
fyi, still seeing this issue
Hi @jjdenhup, Could you kindly help to share the py -m pip install robotframework-autoitlibrary
full output log?
Sure. Not much there though.
D:\repos>py -m pip install robotframework-autoitlibrary Collecting robotframework-autoitlibrary Using cached robotframework_autoitlibrary-1.2.8-py3-none-any.whl Requirement already satisfied: pywin32 in c:\python312\lib\site-packages (from robotframework-autoitlibrary) (306) Requirement already satisfied: pillow in c:\python312\lib\site-packages (from robotframework-autoitlibrary) (10.4.0) Installing collected packages: robotframework-autoitlibrary Successfully installed robotframework-autoitlibrary-1.2.8 D:\repos>
Note that the workaround in #31 does work. If i clone the repo and run the script from there, it is successful. https://github.com/nokia/robotframework-autoitlibrary/issues/31#issuecomment-864686955
I started digging and figured out a few things but not enough for a PR, so I thought i'd share.
pip install
of the package is not[/no longer?] calling setup.py install
as part of it's install process. Meaning the custom code you have in there is never being executed. This also explains why the workaround is successful, as it explicitly is calling setup.py install
from setuptools import setup
from sysconfig import get_path
and then change (get_python_lib() to get_path('platlib')
- But I have not figured out what the proper changes are in setup.py to get the custom actions to be called in the pip install
I created a PR with changes that work on latest versions of Python. Let me know if you have questions.
Hello @lucyking , when the fix will be available on pypi.org ? I still see the version from January 2022. Thank you. Joel
hi @joel-bgl, v1.2.9 released now.
fix by v1.2.9
Hi,
here is how I use it:
install:
in a cmd promt as admin:
regsvr32.exe *:\UserData\*******\AppData\Roaming\Python\Python39\site-packages\RobotFramework\Extensions\AutoItLibrary\AutoItX3.dll
the robot file I use:
here is what I get:
Error in file '*:\*********\ui_robot_testing\test.robot' on line 2: Initializing library 'AutoItLibrary' with no arguments failed: com_error: (-2147221164, 'Class not registered', None, None)
let me know if you need more informations