Pyueye IDS Camera - ids

I am working with IDS camera and they have a python module called pyueye. I installed it using pip, but it seems like the dll are missing:
Traceback (most recent call last):
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/dll.py", line 166, in load_dll
dll = DLL(libinfo, libnames, os.getenv(envname))
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/dll.py", line 96, in __init__
raise RuntimeError("could not find any library for {} ({})".format(libinfo, dllmsg))
RuntimeError: could not find any library for ueye_api (DLL_PATH: unset)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bikram/Documents/uEye/1.py", line 1, in <module>
from pyueye import ueye
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/__init__.py", line 56, in <module>
from . import ueye
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/ueye.py", line 58, in <module>
get_dll_file, _bind = load_dll("ueye_api", ["ueye_api_64", "ueye_api"], "PYUEYE_DLL_PATH")
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/dll.py", line 168, in load_dll
raise ImportError(exc)
ImportError: could not find any library for ueye_api (DLL_PATH: unset)
I noticed someone else had the same issue in windows.
Does anyone else have the same issue using pyeue?

I had same issue but then I downloaded IDS Software Suite from https://en.ids-imaging.com/
Installed it and everything worked. Give it a try.
It will also let you configure their camera from IDS Camera Manager before you use it from Python.

Related

Read the Docs with nbsphinx

I created my own docs for Read the Docs. See my repository
Some of my docs files are jupyter notebook so I used nbshpinx for it.
In my computer I installed all the dependencies and it works great when I use make html.
However, Read the docs throws the error:
Running Sphinx v1.8.5
loading translations [en]... done
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/complex-valued-neural-networks/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 472, in load_extension
mod = __import__(extname, None, None, ['setup'])
ModuleNotFoundError: No module named 'nbsphinx'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/complex-valued-neural-networks/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 303, in build_main
args.tags, args.verbosity, args.jobs, args.keep_going)
File "/home/docs/checkouts/readthedocs.org/user_builds/complex-valued-neural-networks/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 228, in __init__
self.setup_extension(extension)
File "/home/docs/checkouts/readthedocs.org/user_builds/complex-valued-neural-networks/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 449, in setup_extension
self.registry.load_extension(self, extname)
File "/home/docs/checkouts/readthedocs.org/user_builds/complex-valued-neural-networks/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 475, in load_extension
raise ExtensionError(__('Could not import extension %s') % extname, err)
sphinx.errors.ExtensionError: Could not import extension nbsphinx (exception: No module named 'nbsphinx')
Extension error:
Could not import extension nbsphinx (exception: No module named 'nbsphinx')
Following this tutorial I created two yml files and the error changed to:
Error
Problem in your project's configuration. Invalid "conda.environment": environment not found
Solved it!
I followed this tutorial
I added in readthedocs.yml:
python:
version: 3
install:
- requirements: docs/requirements.txt
system_packages: true
And then in docs/requirements.txt:
ipykernel
nbsphinx
If questions you can always check the repository where I do it.

RobotFramework - Importing test library "AutoItLibrary" failed: Initializing test library 'AutoItLibrary' with no arguments failed

Can anyone support me this case?
I install Robotframework to a machine (win10 64b). The versions in my machine:
Python3.7.2 (32b)
pywin32==224 (32b)
robotframework==3.1.1
robotframework-autoitlibrary==1.2.3
robotframework-ride==1.7.3.1
robotframework-seleniumlibrary==3.3.1
wxPython==4.0.4 (32b)
Import AutoItLibary, it is always red, Ride error log shows:
Traceback (most recent call last):
Initializing test library 'AutoItLibrary' with no arguments failed: RobotNotRunningError: Cannot access execution context
Traceback (most recent call last):
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 167, in _get_instance
return libcode(*self.positional_args, **dict(self.named_args))
File "c:\python37-32\lib\site-packages\AutoItLibrary\__init__.py", line 88, in __init__
self._OutputDir = self._get_log_dir()
File "c:\python37-32\lib\site-packages\AutoItLibrary\__init__.py", line 182, in _get_log_dir
variables = BuiltIn().get_variables()
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 1293, in get_variables
return self._variables.as_dict(decoration=is_falsy(no_decoration))
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 75, in _variables
return self._namespace.variables
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 71, in _namespace
return self._get_context().namespace
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 66, in _get_context
raise RobotNotRunningError('Cannot access execution context')
File "c:\python37-32\lib\site-packages\robotide\spec\librarymanager.py", line 87, in _fetch_keywords
return get_import_result(path, library_args)
File "c:\python37-32\lib\site-packages\robotide\spec\libraryfetcher.py", line 24, in get_import_result
lib = robotapi.TestLibrary(path, args)
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 54, in TestLibrary
lib.create_handlers()
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 100, in create_handlers
self._create_handlers(self.get_instance())
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 159, in get_instance
self._libinst = self._get_instance(self._libcode)
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 169, in _get_instance
self._raise_creating_instance_failed()
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 314, in _raise_creating_instance_failed
% (self.name, args_text, msg, details))
20190326 17:31:22.876 [INFO]: Found Robot Framework version 3.1.1 from c:\python37-32\lib\site-packages\robot.
20190326 17:31:22.876 [INFO]: Started RIDE 1.7.3.1 using python version 3.7.2 with wx version 4.0.4 in win32. ```
I had the same problem with the robotframework-autoitlibrary.
The way I found to fix and use autoit in RF was to uninstall the "robotframework-autoitlibrary" and install the "autoitlibrary" found here: https://code.google.com/archive/p/robotframework-autoitlibrary/ with python setup.py install as Admin.
Initializing error is now gone.
AutoItLibrary is not built in with robot framework you need to import the library.
pip install robotframework-autoitlibrary

iprof and iprof_totals profiling error

I get this error after trying :
openmdao iprof x.py
or
openmdao iprof_totals x.py
on my terminal. Any idea why it could be? Do we have a simple sample code where the iprof works smoothly.
Traceback (most recent call last):
File "/home/user/miniconda3/bin/openmdao", line 11, in
sys.exit(openmdao_cmd())
File "/home/user/miniconda3/lib/python3.6/site-packages/openmdao/utils/om.py", line 403, in openmdao_cmd
options.executor(options)
File "/home/user/miniconda3/lib/python3.6/site-packages/openmdao/devtools/iprofile.py", line 373, in _iprof_totals_exec
_iprof_py_file(options)
File "/home/user/miniconda3/lib/python3.6/site-packages/openmdao/devtools/iprofile.py", line 429, in _iprof_py_file
_finalize_profile()
File "/home/user/miniconda3/lib/python3.6/site-packages/openmdao/devtools/iprofile.py", line 183, in _finalize_profile
qfile, qclass, qname = find_qualified_name(filename, int(line), cache, full=False)
File "/home/user/miniconda3/lib/python3.6/site-packages/openmdao/devtools/iprof_utils.py", line 73, in find_qualified_name
with open(filename, 'Ur') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'packages/openmdao/jacobians/jacobian.py'
I looked into this and there is currently a bug when using 'openmdao iprof' and 'openmdao iprof_totals' on a version of OpenMDAO that was not installed from an OpenMDAO repository using 'pip install -e'. I put a story in our bug tracker to fix it.

Spyder not working after installation of other packages

In summary: as far as I recall, after conda-installing fenics and sfepy (along with, through pip, some dependencies), I cannot run spyder:
$ spyder
Traceback (most recent call last):
File "/home/charles/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: No module named 'PyQt5.QtWebEngineWidgets'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/charles/anaconda3/bin/spyder", line 6, in
sys.exit(spyder.app.start.main())
File "/home/charles/anaconda3/lib/python3.5/site-packages/spyder/app/start.py", line 103, in main
from spyder.app import mainwindow
File "/home/charles/anaconda3/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 92, in
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/home/charles/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5: version `Qt_5' not found (required by /home/charles/anaconda3/lib/python3.5/site-packages/PyQt5/QtWebKitWidgets.so)
Along the method of
https://www.scivision.co/fix-spyder-cxxabi-not-found-qt-error/
Would it be a terrible idea to simply copy
/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5
to
~/anaconda3/lib/
a la
cp /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 ~/anaconda3/lib/
?
I'm paranoid about breaking something, is there a high probability of that happening?
Surely there's a better way to do this, no?
Thanks!

pkg_resources.DistributionNotFound: distribute error on new Plone 4.3 instance

I've just installed a new plone 4.3 instance in a folder which already contained 2 Plone 4.3 instance, which both work fine. When I try to run buildout I get this error:
Traceback (most recent call last):
File "bin/buildout", line 17, in <module>
import zc.buildout.buildout
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 40, in <module>
import zc.buildout.download
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/download.py", line 20, in <module>
from zc.buildout.easy_install import realpath
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 31, in <module>
import setuptools.package_index
File "/usr/local/Plone4.3/Python-2.7/lib/python2.7/site-packages/distribute-0.6.35-py2.7.egg/setuptools/package_index.py", line 158, in <module>
sys.version[:3], require('distribute')[0].version
File "/usr/local/Plone4.3/buildout-cache/eggs/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 666, in require
continue # try the next older version of project
File "/usr/local/Plone4.3/buildout-cache/eggs/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: distribute
Google has failed me. Can anyone tell me how to resolve this error?

Resources