I tried to import autoitlibrary into Ride GUI but it failed with the below error.
"20200316 17:23:25.335 [WARN]: Importing test library "C:\Users\user\AppData/Local/Continuum/anaconda3/Lib/site-packages/RobotFramework/Extensions/AutoItLibrary/" failed
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Continuum\anaconda3\lib\site-packages\robotide\spec\librarymanager.py", line 86, in _fetch_keywords
library_name.replace('/', os.sep), os.path.abspath('.'))
File "C:\Users\user\AppData\Local\Continuum\anaconda3\lib\site-packages\robotide\spec\xmlreaders.py", line 99, in get_path
return _resolve_path(name.replace('/', os.sep), basedir)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\lib\site-packages\robotide\spec\xmlreaders.py", line 116, in _resolve_path
raise robotapi.DataError"
Anything which am not doing it right??
Following the installation instructions on AutoItLibrary's project Readme, I found no problems. Special attention is the administrative privilege command. The version is 1.2.5 (which may be newer than the date of the question).
Screenshot of simple example with RIDE 2.0b1.dev0 (current development version):
Related
Just trying the quickstart described here:
https://docs.xlwings.org/en/stable/reports.html#quickstart
I've copied the small code sample and created the template sheet as described. When I run report.py, I get the following:
Traceback (most recent call last):
File "report.py", line 17, in <module>
book = app.render_template(this_dir / 'mytemplate.xlsx',
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/main.py", line 699, in render_template
return render_template(
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/pro/reports/main.py", line 439, in render_template
wb = app.books.open(output)
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/main.py", line 4988, in open
return Book(impl=self.impl.open(json=json))
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/pro/_xlremote.py", line 217, in open
book = Book(api=json, books=self)
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/pro/_xlremote.py", line 268, in __init__
if api["version"] != __version__:
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "report.py", line 20, in <module>
book.to_pdf(this_dir / 'myreport.pdf')
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/main.py", line 764, in __exit__
self.quit()
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/main.py", line 388, in quit
return self.impl.quit()
File "/home/james/dev/repos/eft/auto-reports/env/lib/python3.8/site-packages/xlwings/base_classes.py", line 50, in quit
raise NotImplementedError()
NotImplementedError
This is essentially out of the box so I can't see that I've done anything wrong. I'm running on Ubuntu 20.04.5 LTS. Python is 3.8.10. I have the follwing dependencies:
numpy==1.23.4
pandas==1.5.1
python-dateutil==2.8.2
pytz==2022.5
six==1.16.0
xlwings==0.28.2
Any suggestions? Thanks.
Traditionally, xlwings only worked on Windows or macOS with an actual installation of Microsoft Excel. More recently (in 2022) it added Linux support for xlwings Server and xlwings File Reader, but xlwings Reports still has to be run in connection with Excel, i.e., runs on Windows and macOS only. While the installation instructions mention this, I'll try to improve the docs to mark the requirements on the respective pages.
I have a problem with the "pretty printer" option of IDE NSight (eclipse) when I try to debug. I have googled but I have not found a solution to my problem.
When I start to debug, appears the next message:
Traceback (most recent call last):
File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21-gdb.py", line 64, in <module>
register_libstdcxx_printers(gdb.current_objfile())
File "/usr/lib/x86_64-linux-gnu/../../share/gcc-5/python/libstdcxx/v6/__init__.py", line 33, in register_libstdcxx_printers
register_libstdcxx_xmethods(obj)
File "/usr/lib/x86_64-linux-gnu/../../share/gcc-5/python/libstdcxx/v6/xmethods.py", line 600, in register_libstdcxx_xmethods
gdb.xmethod.register_xmethod_matcher(locus, ArrayMethodsMatcher())
File "/usr/share/gdb/python/gdb/xmethod.py", line 266, in register_xmethod_matcher
index = _lookup_xmethod_matcher(locus, matcher.name)
File "/usr/share/gdb/python/gdb/xmethod.py", line 236, in _lookup_xmethod_matcher
for i in range(0, len(locus.xmethods)):
AttributeError: 'gdb.Objfile' object has no attribute 'xmethods'
I'm not sure where is the problem but the variables values doesn't appear and the only solution is to disable the pretty print option.
I'm using Ubuntu 16.04 and the cuda toolkit was installed from repositories.
If anyone can help, I will be very grateful.
This sounds like a bug in your gdb installation. gdb.Objfile.xmethods is something that should be provided by the gdb core, which implements gdb.Objfile. So, examining it from /usr/share/gdb/python/gdb/xmethod.py should be ok -- because that is also a file that comes with gdb.
useing Pyinstaller packages a python script
Pyinstaller version 3.2
OS:Ubuntu
Traceback (most recent call last):
File "<string>", line 57, in <module>
File "<string>", line 29, in feature_extract
File "caffe/io.py", line 295, in load_image
File "skimage/io/_io.py", line 100, in imread
File "skimage/io/manage_plugins.py", line 194, in call_plugin
RuntimeError: No suitable plugin registered for imread.
You may load I/O plugins with the `skimage.io.use_plugin` command. A list of all available plugins can be found using `skimage.io.plugins()`.
file_test returned -1
I have been getting above error. Could some one please tell me how would i fix it?
The problem seems to be related to this github issue, essentially the skimage.io._plugins submodule is making life hard for Pyinstaller.
To make sure everything you need is packaged you should have a hook file that contains
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
datas = collect_data_files("skimage.io._plugins")
hiddenimports = collect_submodules('skimage.io._plugins')
(or if you already have a hook file with these, extend the current datas and hiddenimports).
I have Mercurial 1.8.1, Python 2.6.6 installed on Win 2k8 R2 running on a vm. I have tried installing from msi, source and using tortisehg. Command-line Hg works fine but I get the same error when running the hgweb.cgi:
Traceback (most recent call last):
File ".\hgweb.cgi", line 17, in
application = hgweb(config)
File "mercurial\hgweb\__init__.pyc", line 26, in hgweb
File "mercurial\hgweb\hgwebdir_mod.pyc", line 61, in __init__
File "mercurial\hgweb\hgwebdir_mod.pyc", line 70, in refresh
File "mercurial\ui.pyc", line 35, in __init__
File "mercurial\demandimport.pyc", line 75, in __getattribute__
File "mercurial\demandimport.pyc", line 47, in _load
File "mercurial\util.pyc", line 576, in
File "mercurial\demandimport.pyc", line 85, in _demandimport
File "mercurial\windows.pyc", line 21, in
File "mercurial\demandimport.pyc", line 75, in __getattribute__
File "mercurial\demandimport.pyc", line 47, in _load
File "mercurial\osutil.pyc", line 12, in
File "mercurial\osutil.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
The other answers I have found on SO and elsewhere pointed me to try installing from source, dropping the pure osutil into the install, or installing an older version. I have tried them all.
This is especially frustrating because I have other, similar non-vm machines running fine but have been unable to find the disconnect.
Ideas?
I had the same error using following system configuration
Python-2.6.6 installed as msi
mercurial-1.8.2-x86 installed as msi
IIS7
I solved this problem simply:
Python has been installed early
Uninstall Mercurial msi package
Download and install "Mercurial-1.8.2 (32-bit py2.6)" installer from mercurial website which is marked as "This is recommended for hgweb setups".
copyed content of C:\Python26\Lib\site-packages\mercurial\ to the directory used in IIS7 website setup.
Till now all is working. Hope this will help.
Whenever I have less than descriptive error messages that tell me something is going on at the system level but not what, I use Sysinternals' Procmon to tell me what's going with the registry and filesystem. It's verbose, and getting the filter to show just the process of interest takes some learning, but you can export the results to Excel and skim them for suspicious-looking results. Pay particular attention to failures, of course.
Give it a try and see what DLL is being searched for.
I've been having a real issue trying to make Rpy2 play nice with my R install. I first tried installing the rpy2 MSI package, and this didn't appear to work. When I ran the recommended tests, it was giving me an error saying that it couldn't find the R.dll, because the new R installs (post 2.11) install the DLLs into an i386 folder, where rpy2 can't find them because its looking in the bin folder instead of the bin/i386 folder.
Then I tried to build the install from scratch myself using the command line tools (distutils) included with python. This didn't work, because setup.py claimed to be unable to find the R_home location. But I did work out that editing an environment variable (PATH) might show the rpy2 setup where to find the R installation. I then made a couple of edits to the environment, adding the "R_home" variable pointing to the bin/i386 directory, and made a new entry under the PATH variable, pointing to the same spot.
Unfortunately, when it found the R path, I got this issue instead:
running build
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 372, in <module>
[os.path.join('doc', 'source', 'rpy2_logo.png')])]
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Python26\lib\distutils\command\build.py", line 134, in run
self.run_command(cmd_name)
File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Python26\lib\distutils\dist.py", line 994, in run_command
cmd_obj.ensure_finalized()
File "C:\Python26\lib\distutils\cmd.py", line 117, in ensure_finalized
self.finalize_options()
File "setup.py", line 111, in finalize_options
config += get_rconfig(r_home, about)
File "setup.py", line 264, in get_rconfig
rc = RConfig.from_string(rconfig)
File "setup.py", line 252, in from_string
+ '\nin string\n' + string)
ValueError: Invalid substring in string
So I went back to trying to use the premade install, thinking that maybe the new edits to the environment might work but got this issue here
Traceback (most recent call last):
File "<string>", line 245, in run_nodebug
File "C:\Documents and Settings\User\Desktop\rpy2-2.1.9\rpy\tests.py", line 3, in <module>
import rpy2.robjects.tests
File "C:\Python26\lib\site-packages\rpy2\robjects\__init__.py", line 12, in <module>
import rpy2.rinterface as rinterface
File "C:\Python26\lib\site-packages\rpy2\rinterface\__init__.py", line 56, in <module>
raise RuntimeError("Unable to locate R.dll within %s" % R_HOME)
RuntimeError: Unable to locate R.dll within C:\Program Files\R\R-2.12.1\bin\i386
This is REALLY weird, because (as anyone can check on their own install) R installs R.dll into "C:\Program Files\R\R-2.12.1\bin\i386" and I've checked and verified that its in there, and I've pointed rpy2 to this directory in the windows default PATH! I know for a fact that rpy2 is looking in the right place, but can't understand why its not seeing R.dll.
So why can't rpy2 find it? And does anyone know a way to get rpy2 working with R 2.12? Perhaps I should try the newer rpy2 2.2.0 version? Its still in development though, and 1.9 is supposed to be able to handle R 2.12 according to this website so I don't know what to do...
Thanks to anyone who can help out...
[EDIT] I've also tried these instructions over here but they return the same "can't find DLL" error... Unless you change the environment variable "R_home" to point straight at the c/program files/R/R 2.12 directory instead of into the i386 subdirectory.
If it points at the right place, you get these errors back. This looks a bit more promising... But its still pretty bad!
.......................F....................................F.FFF...F....................................................................F..................................
======================================================================
FAIL: testNewWithoutInit (rpy2.rinterface.tests.test_SexpVector.SexpVectorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\rpy2\rinterface\tests\test_SexpVector.py", line 43, in testNewWithoutInit
self.assertTrue(False) # worked when tested, but calling endEmbeddedR causes trouble
AssertionError
======================================================================
FAIL: testCallErrorWhenEndedR (rpy2.rinterface.tests.test_EmbeddedR.EmbeddedRTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\rpy2\rinterface\tests\test_EmbeddedR.py", line 122, in testCallErrorWhenEndedR
self.assertTrue(False) # worked when tested, but calling endEmbeddedR causes trouble
AssertionError
======================================================================
FAIL: testReadConsoleWithError (rpy2.rinterface.tests.test_EmbeddedR.EmbeddedRTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\rpy2\rinterface\tests\test_EmbeddedR.py", line 117, in testReadConsoleWithError
self.assertTrue(errorstring.startswith('Traceback'))
AssertionError
======================================================================
FAIL: testSetReadConsole (rpy2.rinterface.tests.test_EmbeddedR.EmbeddedRTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\rpy2\rinterface\tests\test_EmbeddedR.py", line 97, in testSetReadConsole
self.assertEquals(yes.strip(), res[0])
AssertionError: 'yes' != ''
======================================================================
FAIL: testSetWriteConsole (rpy2.rinterface.tests.test_EmbeddedR.EmbeddedRTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\rpy2\rinterface\tests\test_EmbeddedR.py", line 36, in testSetWriteConsole
self.assertEquals('[1] "3"\n', str.join('', buf))
AssertionError: '[1] "3"\n' != ''
======================================================================
FAIL: testWriteConsoleWithError (rpy2.rinterface.tests.test_EmbeddedR.EmbeddedRTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\rpy2\rinterface\tests\test_EmbeddedR.py", line 55, in testWriteConsoleWithError
self.assertTrue(errorstring.startswith('Traceback'))
AssertionError
======================================================================
FAIL: testVectorUnicodeCharacter (rpy2.robjects.tests.testNumpyConversions.NumpyConversionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\rpy2\robjects\tests\testNumpyConversions.py", line 54, in testVectorUnicodeCharacter
self.assertTrue(False) # arrays of unicode characters causing segfault
AssertionError
----------------------------------------------------------------------
Ran 172 tests in 0.407s
FAILED (failures=7)
Exit code: True
After many hours of searching on the web and trying out many different things, amongst others encountering the same issues as above, I finally got Rpy2 working on my windows 7 computer!
Basically, the crucial help came from this thread: http://www.mail-archive.com/rpy-list#lists.sourceforge.net/msg03348.html.
Summarized, these were the steps to get rpy2 up and running on Windows7:
Install rpy2 from this link: https://bitbucket.org/breisfeld/rpy2_w32_fix/issue/1/binary-installer-for-win32
Add the path to R.dll to the environment variable PATH (C:\Program Files\R\R-2.12.1\bin\i386 in my case)
Add an environment variable R_HOME (C:\Program Files\R\R-2.12.1 in my case)
Add an environment variable R_USER (simply my username in Windows)
Restart your Python IDE (otherwise the environment variables are not reloaded!)
RPy2 isn't tested on Windows. You can try using an older version (2.0.8) with a Windows installer, but that may have trouble with newer versions of R.
The author doesn't use Windows. If you've got the knowledge to get a newer version working on Windows, I'm sure he'd welcome contributions.
I'm not sure where to write this, as I can't comment (no reputation points), but feel it is useful info on this problem. The reason for the aggravating "Unable to locate R.dll within..." error message, even when you know that R.dll is located exactly where it says, is that the program isn't actually looking in that directory. I think the relevant action happens in rpy2's "init.py" module in these lines:
import win32api
os.environ['PATH'] += ';' + os.path.join(R_HOME, 'bin', _win_bindir)
os.environ['PATH'] += ';' + os.path.join(R_HOME, 'modules', _win_bindir)
os.environ['PATH'] += ';' + os.path.join(R_HOME, 'lib')
# Load the R dll using the explicit path
R_DLL_DIRS = ('bin', 'lib')
# Try dirs from R_DLL_DIRS
for r_dir in R_DLL_DIRS:
Rlib = os.path.join(R_HOME, r_dir, _win_bindir, 'R.dll')
if not os.path.exists(Rlib):
continue
win32api.LoadLibrary( Rlib )
_win_ok = True
break
# Otherwise fail out!
if not _win_ok:
raise RuntimeError("Unable to locate R.dll within %s" % R_HOME)
As you can see, the error message will always say that it is looking in whatever directory you have set as R_HOME, but it will actually be looking in the directory "R_HOME\ r_dir\win_bindir". So when you see a message like "Unable to locate R.dll within C:\Program Files\R\R-2.12.1\bin\i386", that's because it is actually looking for a directory named C:\Program Files\R\R-2.12.1\bin\i386\R-2.12.1\bin\i386\, or something like that.
Point 3 in Kadee's answer fixes this by leaving the path specified only down to immediately above the \bin level.