Install AutoIt Library for Robot Framework - Win 10 - robotframework

I am trying to install the autoIt library to use it with robotFramework, but I keep encoutering this error:
Don't think we need to unregister the old one...
%SYSTEMROOT%\system32\regsvr32.exe /S C:\xxx xxx\Python27\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
Traceback (most recent call last):
File "setup.py", line 70, in <module>
subprocess.check_call(cmd, shell=True)
File "C:\Python27\lib\subprocess.py", line 504, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '%SYSTEMROOT%\system32\regsvr32.exe /S C:\xxx xxx\Python27\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll' returned non-zero exit status 1
I have tried all the solution found so far on stackoverflow:
Run cmd as Administrator
Set HOMEDRIVE environment variable
Manually run this command %SYSTEMROOT%\system32\regsvr32.exe /S C
C:\Python27\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll (which throw no
error)
Using a fixed setup
py script :https://github.com/qitaos/robotframeworkautoitlibrary/issues/30
( which trhow this error :subprocess.CalledProcessError: Command 'python "C:\xxx xxx\Python27\Lib\site-packages\win32com\client\makepy.py" "C:\xxx xxx\Python27\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll"' returned non-zero exit status 1
Does anyone have others solutions ?
(If not I will go for SikuliX, even if AutoIt is the best for Win automation)
Thanks !

Related

pyOptSparse Error: There was an error importing the compiled snopt module during testing of OpenMDAO

I need to use open framework openMDAO for my project in Ubuntu. I have successfully installed mpi4py, petsc, petsc4py by creating new environment in anaconda. I have also installed pyoptsparse and other libraries.
After installation when I run test command $ testflo openmdao -n 1
It gives error as:
(omd) mujahed#Lenovo-G50-80:~$ testflo openmdao -n 1
.............................................................................
+------------------------------------------------------------------------------+
| pyOptSparse Error: There was an error importing the compiled snopt module |
+------------------------------------------------------------------------------+
SSS......../home/mujahed/anaconda3/envs/omd/lib/python3.8/site-packages/openmdao/core/group.py:1113: UserWarning:Group (sub): Attempted to connect from &apos;tgt.x&apos; to &apos;cmp.x&apos;, but &apos;tgt.x&apos; is an input. All connections must be from an output to an input.
.......................................................................................................................................................................................................................................................................................................................................................S...............................................................................................................................S........................................................................S.SS........................................................................................................................................................................................................................................................................SSS.SSSSSS..S.................................................................................................................................................................................................................................................................................................................S.......
+------------------------------------------------------------------------------+
| pyOptSparse Error: There was an error importing the compiled snopt module |
+------------------------------------------------------------------------------+
.....................................................................(mpi) /home/mujahed/anaconda3/envs/omd/lib/python3.8/site-packages/openmdao/core/tests/test_prob_remote2.py:ProbRemoteTestCase.test_get_remote ... FAIL (00:00:0.02, 203 MB)
Traceback (most recent call last):
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/site-packages/testflo/test.py", line 425, in _try_call
func()
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/site-packages/openmdao/core/tests/test_prob_remote2.py", line 200, in test_get_remote
prob.get_val(&apos;par.c2.x&apos;, get_remote=False)
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/unittest/case.py", line 227, in __exit__
self._raiseFailure("{} not raised".format(exc_name))
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/unittest/case.py", line 164, in _raiseFailure
raise self.test_case.failureException(msg)
AssertionError: RuntimeError not raised
...
+------------------------------------------------------------------------------+
| pyOptSparse Error: There was an error importing the compiled snopt module |
+------------------------------------------------------------------------------+
SSS...............................................S.....X......................................................................................................................................................................................
+------------------------------------------------------------------------------+
| pyOptSparse Error: There was an error importing the compiled snopt module |
+------------------------------------------------------------------------------+
..SS............S...capi_return is NULL
Call-back cb_slfunc_in_slsqp__user__routines failed.
.capi_return is NULL
Call-back cb_slfunc_in_slsqp__user__routines failed.
....S..........................SSSSSSS.......
Normal return from subroutine COBYLA
NFVALS = 56 F =-1.080000E+02 MAXCV = 0.000000E+00
X = 3.500001E+00 -3.500001E+00
.................................................
Normal return from subroutine COBYLA
NFVALS = 124 F =-2.733333E+01 MAXCV = 0.000000E+00
X = 6.666667E+00 -7.333332E+00
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................SSSSSSSSSSSSSSSSSSSSSSSS..............
Normal return from subroutine COBYLA
NFVALS = 54 F =-2.700000E+01 MAXCV = 0.000000E+00
X = 6.999999E+00 -6.999999E+00
.............................................SSS..............................................................................................................S...........................................................................................................................................................................................................................................................................................................................................................
The following tests failed:
test_prob_remote2.py:ProbRemoteTestCase.test_get_remote
Passed: 2619
Failed: 1
Skipped: 62
Ran 2682 tests using 1 processes
Wall clock time: 00:22:33.07
Passed: 2619
Failed: 1
Skipped: 62
I don’t have computer science background and this is the first time I am dealing with something like this.
I am using:
openMDAO 3.2.1
mpich 3.3.2
mpi4py 3.0.3
petsc 3.13.4
petsc4py 3.13.0
pyoptsparse 2.1.5
python 3.8.5
I have build pyoptsparse from https://github.com/OpenMDAO/build_pyoptsparse by command ./build_pyoptsparse.sh.
I have Ubuntu 20.04.1 LTS and I am using Anaconda3. How can I pass all the tests (Without skipping)?
Can please anyone help me with this?
Apologies for this.. it looks like an extraneous file (test_prob_remote2.py) made it into the distribution.. This is not a legitimate test and you can ignore it.
The "pyOptSparse Error" messages are just telling you that you don't have the SNOPT optimizer installed, which is fine.
Your installation should be good.
Some of that test output can be a bit confusing. The error you're getting isn't actually with SNOPT. Thats a warning spit out by pyoptsparse, but it is not a problem.
The actual failed test is identified by this line:
The following tests failed:
test_prob_remote2.py:ProbRemoteTestCase.test_get_remote
And the error that causes the failure is here:
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/site-packages/testflo/test.py", line 425, in _try_call
func()
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/site-packages/openmdao/core/tests/test_prob_remote2.py", line 200, in test_get_remote
prob.get_val('par.c2.x', get_remote=False)
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/unittest/case.py", line 227, in __exit__
self._raiseFailure("{} not raised".format(exc_name))
File "/home/mujahed/anaconda3/envs/omd/lib/python3.8/unittest/case.py", line 164, in _raiseFailure
raise self.test_case.failureException(msg)
AssertionError: RuntimeError not raised
For some reason your install isn't raising an error when one is expected. Im not sure why thats going on, but if you're not planning to run with MPI then its not a problem.
You have bothered to install MPI, so you are probably be planning to run things in parallel... this one failed test is certainly odd. If you had a serious problem with your MPI install you would get more failed tests I think.
You could try running testflo like this:
testflo openmdao -n 1 --show_skipped to see if more MPI tests are being skipped... that might help you narrow it down.

Module Import Error with Nosetests and Tox

In my project, I am using tox with nosetests. Using PyCharm, my tox pipeline was passing completely including all the tests. When I execute tox on a Ubuntu18.04 container with python3, it gives me the following error:
ImportError: No module named 'my_project'
leading to the following error at the end:
ERROR: InvocationError for command /.tox/py36/bin/nosetests (exited with code 1)
my_project is the name of the module I am testing and the directory structure looks like this under /, the root dir from which I am executing tox:
my_project/
tests/
tox.ini
setup.cfg
other files
My tox.ini looks as follows:
[tox]
envlist = py36
[testenv]
commands = python3 setup.py build
nosetests
deps = -r{toxinidir}/test-requirements.txt
I have tried to provide the path to project in different ways to nosetests command but none of that works. One line that interests me is in the initial output of tox:
py36 installed: my_project # file:///.tox/.tmp/package/1/my_project-0.4.post52.dev256143400.zip,
which leads me to think if this is the reason that nosetests does not find my_project.
For details, the stack trace for the error is as follows:
ERROR: Failure: ImportError (No module named 'my_project')
Traceback (most recent call last):
File "/.tox/py36/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/.tox/py36/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 79, in importFromDir
fh, filename, desc = find_module(part, path)
File "/usr/lib/python3.6/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'my_project'
I see three possible offenders.
(1) python3 setup.py build should not exist in the commands section.
# the build command is redundant, there is a special option for this.
commands = python3 setup.py build
nosetests
# The install command with it's default
install_command=python -m pip install {opts} {packages}(ARGV)
deps = -r{toxinidir}/test-requirements.txt
(2) And with Pycharm you might have added your project as a sources root (right click folder > mark directory as > sources root). Or configured it otherwise (PATH variable perhaps?) that makes my_project available in context to running it in Pycharm? This should not happen inside tox though, unless you have whitelist externals or sitepackages turned to True..
So when installed on a container this link does not exist.
(3) I can't help but notice the abscence of a setup.py or pyproject.toml. Files used to install my_project. E.g. run this command locally and debug your installation if it doesn't work:
pip install .

Error in install_keras() in R since Ubuntu update

I used the book "Deep Learning with R" since one month now, and it enables me to make my first neural networks.
I am using Ubuntu. Until 2 days ago, everything was OK and worked fine. But two days ago I updated my Ubuntu to Ubuntu 18.02. Since then, my R code is not working anymore.
I have re-done what is recommended in the book (and what has worked one month ago):
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install python-pip python-dev
$ sudo apt-get install build-essential cmake git unzip pkg-config libopenblas-dev liblapack-dev
I had no error.
then in R:
install.packages("keras")
library(keras)
install_keras()
This last command is supposed to install the core Keras library along with its dependencies in a Python virtual environment using TensorFlow.
But I obtained the following error that I really do not understand:
> install_keras()
Using existing virtualenv at ~/.virtualenvs/r-tensorflow
Upgrading pip ...
Traceback (most recent call last):
File "/home/baragatt/.virtualenvs/r-tensorflow/bin/pip", line 7, in <module>
from pip._internal import main
File "/home/baragatt/.virtualenvs/r-tensorflow/local/lib/python2.7/site-packages/pip/_internal/__init__.py", line 5, in <module>
import logging
File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File "/usr/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Erreur : Error 1 occurred installing TensorFlow
I have re-installed R, python, tensorflow, but I always have the same error. I do not understand this error. Maybe this is a problem with the virtualenv?
Can someone help me please? It is so frustrating, because two days ago my code was running, and now impossible to work...
I am working with Ubuntu 18.02, at the installed versions are python 2.7.15~rc1-1, R-3.4.4 and tensorflow-1.10.0.
Thanks a lot for this post. I do not really understand what the commands in this post are supposed to fix. But I have done the following:
cd /home/baragatt/.virtualenvs/r-tensorflow/
Then, as proposed in the post:
virtualenv . --system-site-packages
I obtained the following messages:
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/baragatt/.virtualenvs/r-tensorflow/bin/python2
Not overwriting existing python script /home/baragatt/.virtualenvs/r-tensorflow/bin/python (you must use /home/baragatt/.virtualenvs/r-tensorflow/bin/python2)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 946, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1417, in install_python
os.symlink(py_executable_base, full_pth)
OSError: [Errno 17] File exists
I also tried:
virtualenv -p /usr/bin/python2.7 .
And I obtained:
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/baragatt/.virtualenvs/r-tensorflow/bin/python2.7
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 946, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1278, in install_python
shutil.copyfile(executable, py_executable)
File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 40] Too many levels of symbolic links: '/home/baragatt/.virtualenvs/r-tensorflow/bin/python2.7'
I finally find a solution, by looking at different forums.
I thought that the problem should be because of the virtualenvironment that should be created when doing the following command in R.
install_keras()
Hence, I deleted the virtual environment(s) by deleting the directory in which these environements are located (I imagine).
cd ~/.virtualenvs
rm -r r-tensorflow/
Then I have tried the following commands in R
install.packages("keras")
library(keras)
install_keras()
And it works! Honestly, I still do not understand what was the problem that occured after my Ubuntu update.

Robot framework, Sikuli hello_world demo script is failing?

I have installed Robot framework 2.8.7 in a solaris server and added sikuli library to it . when tried to run demo script "Hello world" i'm getting the following error.
bash-3.2# pybot /robot/robotframework-SikuliLibrary-master/demo/hello_world/testsuite_sikuli_demo.txt
*[ WARN ] Test get_keyword_names failed! Connecting remote server at http://127.0.0.1:42821/ failed: <Fault 0: 'Failed to invoke method get_keyword_names in class org.robotframework.remoteserver.servlet.ServerMethods: java.lang.RuntimeException'>
[ ERROR ] Error in file '/robot/robotframework-SikuliLibrary-master/demo/hello_world/testsuite_sikuli_demo.txt': Initializing test library 'SikuliLibrary' with no arguments failed: Failed to get_keyword_names!
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/SikuliLibrary/sikuli.py", line 41, in __init__
self.remote = self._connect_remote_library()
File "/usr/lib/python2.7/site-packages/SikuliLibrary/sikuli.py", line 138, in _connect_remote_library
self._test_get_keyword_names(remote)
File "/usr/lib/python2.7/site-packages/SikuliLibrary/sikuli.py", line 155, in _test_get_keyword_names
raise RuntimeError('Failed to get_keyword_names!')*
I have done the same setup on windows machine and it is working fine. Python version used in solaris is 2.6.Can you let me know how to resolve this?
Thanks

Cloudify nodecellar,Task failed 'script_runner.tasks.run' -> RecoverableError('ProcessException: ',)

when I try to install nodecellar with Cloudify,I am getting the following error
2015-07-13T17:31:03 LOG <nodecellar> [mongod_a50aa.configure] ERROR: Exception raised on operation [script_runner.tasks.run] invocation
Traceback (most recent call last):
File "/root/cloudify.host_dba5c/env/local/lib/python2.7/site-packages/cloudify/decorators.py", line 125, in wrapper
result = func(*args, **kwargs)
File "/root/cloudify.host_dba5c/env/local/lib/python2.7/site-packages/script_runner/tasks.py", line 58, in run
return process_execution(script_func, script_path, ctx, process)
File "/root/cloudify.host_dba5c/env/local/lib/python2.7/site-packages/script_runner/tasks.py", line 74, in process_execution
script_func(script_path, ctx, process)
File "/root/cloudify.host_dba5c/env/local/lib/python2.7/site-packages/script_runner/tasks.py", line 143, in execute
stderr_consumer.buffer.getvalue())
How can I fix this problem?
This exception is raised by the Cloudify Script Plugin you ran a script, which exited with a non-zero error code. Here is the source of that error.
The script that returned non-zero code is that script which is mapped to the configure operation on the mongod node. Which script that is depends on the version of the Nodecellar blueprint that you are using.
I can't give a more detailed answer without information regarding the specific blueprint version, which Cloudify version you have installed, details about your provider (local, Vagrant, Openstack, AWS), and OS (Ubuntu, Centos, etc).

Resources