RQT error with pyside - pyside

I am trying to use rqt_graph in ROS kinetic and I am getting the following error. I am not sure what is causing it and have no idea how to fix it.
It seems to be a problem with an undefined symbole but not sure how this would happen.
rosrun rqt_graph rqt_graph
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/rqt_graph/rqt_graph", line 8, in <module>
sys.exit(main.main(sys.argv, standalone='rqt_graph.ros_graph.RosGraph'))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/main.py", line 59, in main
return super(Main, self).main(argv, standalone=standalone, plugin_argument_provider=plugin_argument_provider, plugin_manager_settings_prefix=str(hash(os.environ['ROS_PACKAGE_PATH'])))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/main.py", line 340, in main
from python_qt_binding import QT_BINDING
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/__init__.py", line 55, in <module>
from .binding_helper import loadUi, QT_BINDING, QT_BINDING_MODULES, QT_BINDING_VERSION # #UnusedImport
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 252, in <module>
getattr(sys, 'SELECT_QT_BINDING_ORDER', None),
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 98, in _select_qt_binding
raise ImportError("Could not find Qt binding (looked for: %s):\n%s" % (', '.join(["'%s'" % b for b in binding_order]), '\n'.join(error_msgs)))
ImportError: Could not find Qt binding (looked for: 'pyqt', 'pyside'):
ImportError for 'pyqt': /usr/lib/python2.7/dist-packages/PyQt5/QtCore.x86_64-linux-gnu.so: undefined symbol: _ZTI13QFileSelector
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 89, in _select_qt_binding
QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 131, in _load_pyqt
_named_import('PyQt5.%s' % module_name)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 111, in _named_import
module = builtins.__import__(name)
ImportError: /usr/lib/python2.7/dist-packages/PyQt5/QtCore.x86_64-linux-gnu.so: undefined symbol: _ZTI13QFileSelector
ImportError for 'pyside': /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: undefined symbol: _ZN16QLoggingCategoryD1Ev
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 89, in _select_qt_binding
QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 163, in _load_pyside
_named_import('PySide2.%s' % module_name)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 111, in _named_import
module = builtins.__import__(name)
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: undefined symbol: _ZN16QLoggingCategoryD1Ev
code here

From What I can See In The Log Your pyqt and main Qt5 libs are missing And It's Not ROS Based Error
I Suggest You Install Or Reinstall Those Libs and Make Sure That Python Can Find Them

Related

unable to create executable using Py2exe, throwing error as mentioned below

Hi I'm trying to make an executable using py2exe, I checked my script but cannot find the actual issue why below error is keep getting pop-up during building of exe
Building 'dist\py.exe'.
Traceback (most recent call last):
File "C:\Users\User\PycharmProjects\Test\pyexe\setup.py", line 15, in <module>
freeze(
File "C:\Python39\lib\site-packages\py2exe\__init__.py", line 176, in freeze
builder.build()
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 254, in build
self.build_archive(exe_path)
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 479, in build_archive
base = dist_path.rsplit('\\', 1)[0]
AttributeError: 'NoneType' object has no attribute 'rsplit'
Below is my setup.py script
from py2exe import freeze
from py_version import VERSION, DESCRIPTION # This is my own script
freeze(
console=[{"script": "py.py"}],
options={
"py2exe": {
"dist_dir": "dist",
"bundle_files": 1, # bundle as much as possible
"compressed": True,
}},
version_info={"version":VERSION,
"description":DESCRIPTION,
"company_name":"Priyanshu Kumar",
"copyright":"Opensource, credit goes to David Manthey",
"product_name":"Stand-Alone Python3 Interpreter",
"product_version":VERSION},
zipfile=None)
UPDATE:
I was searching on google for help and found that it should be <<<zipfile="None">>> instead of <<<zipfile=None>>>.
I changed it in my code but now got new error
Traceback (most recent call last):
File "C:\Users\User\PycharmProjects\Test\pyexe\setup.py", line 29, in <module>
options={
File "C:\Python39\lib\site-packages\py2exe\__init__.py", line 176, in freeze
builder.build()
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 273, in build
self.build_archive(libpath, delete_existing_resources=True)
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 397, in build_archive
resource.add(type=os.path.basename(pydll), name=1, value=pydll_bytes)
File "C:\Python39\lib\site-packages\py2exe\resources.py", line 49, in add
raise WindowsError(details) from None
OSError: [WinError 87] The parameter is incorrect.
Press any key to continue . . .

Encountering type error handling when running allennlp test-install

I am using Windows 10 and pip installed the latest allennlp branch. When I successfully install the package, I encountered the following:
$ allennlp test-install
Traceback (most recent call last):
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\604194\AppData\Local\Continuum\anaconda3\envs\domains\Scripts\allennlp.exe\__main__.py", line 4, in <module>
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\run.py", line 15, in <module>
from allennlp.commands import main # pylint: disable=wrong-import-position
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\commands\__init__.py", line 8, in <module>
from allennlp.commands.configure import Configure
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\commands\configure.py", line 27, in <module>
from allennlp.service.config_explorer import make_app
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\service\config_explorer.py", line 24, in <module>
from allennlp.common.configuration import configure, choices
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\common\__init__.py", line 1, in <module>
from allennlp.common.from_params import FromParams
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\common\from_params.py", line 48, in <module>
from allennlp.common.params import Params
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\common\params.py", line 173, in <module>
class Params(MutableMapping):
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\allennlp\common\params.py", line 236, in Params
def pop(self, key: str, default: Any = DEFAULT) -> Any:
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\overrides\overrides.py", line 67, in overrides
return _overrides(method, check_signature, check_at_runtime)
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\overrides\overrides.py", line 93, in _overrides
_validate_method(method, super_class, check_signature)
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\overrides\overrides.py", line 114, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\overrides\signature.py", line 87, in ensure_signature_is_compatible
super_sig, sub_sig, super_type_hints, sub_type_hints, is_static, method_name
File "c:\users\604194\appdata\local\continuum\anaconda3\envs\domains\lib\site-packages\overrides\signature.py", line 213, in ensure_all_positional_args_defined_in_sub
f"`{method_name}: {sub_param.name} must be a supertype of `{super_param.annotation}` but is `{sub_param.annotation}`"
TypeError: `Params.pop: key must be a supertype of `<class 'inspect._empty'>` but is `<class 'str'>`
Any advice on how to resolve this issue? Thanks!
EDIT: Edited my question for more information if needed. Thanks!

while launching spyder , spyder kernel is showing this error. and anaconda is also not installing other environments

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1223, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "C:\Users\Mahima Kaushik\AppData\Roaming\Python\Python38\site‑packages\jupyter_client\manager.py", line 309, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\Mahima Kaushik\AppData\Roaming\Python\Python38\site‑packages\jupyter_client\manager.py", line 256, in pre_start_kernel
self.write_connection_file()
File "C:\Users\Mahima Kaushik\AppData\Roaming\Python\Python38\site‑packages\jupyter_client\connect.py", line 468, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "C:\Users\Mahima Kaushik\AppData\Roaming\Python\Python38\site‑packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 113, in enter
return next(self.gen)
File "C:\Users\Mahima Kaushik\AppData\Roaming\Python\Python38\site‑packages\jupyter_core\paths.py", line 435, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\Mahima Kaushik\AppData\Roaming\Python\Python38\site‑packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: %1 is not a valid Win32 application.
https://github.com/spyder-ide/spyder/issues/12040#issuecomment-705033049
https://github.com/spyder-ide/spyder/issues/12040#issuecomment-705057347
I removed the following directory to fix my problem:
C:\Users\Mahima Kaushik\AppData\Roaming\Python

How to fix this this error in `pip-9.03` and `python-2.6`

I installed python-2.6 and then setuptools and finally pip-9.0.3 on my machine.I added the path of pip in my PATH variable.now when i type pip in my cmd, it returns this error.
C:\Users\Asus>pip
Traceback (most recent call last):
File "C:\Python26\Scripts\pip-script.py", line 11, in <module>
load_entry_point('pip==9.0.3', 'console_scripts', 'pip')()
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 572, in load_
entry_point
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 2769, in load
_entry_point
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 2422, in load
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 2428, in reso
lve
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\__init__.py", line
45, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\vcs\mercurial.py",
line 9, in <module>
from pip.download import path_to_url
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\download.py", line
37, in <module>
from pip.utils.ui import DownloadProgressBar, DownloadProgressSpinner
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\utils\ui.py", line
57, in <module>
_BaseBar = _select_progress_class(IncrementalBar, Bar)
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\utils\ui.py", line
50, in _select_progress_class
six.text_type().join(characters).encode(encoding)
LookupError: unknown encoding: cp720
unfortunately this website www.pypi.org is unavailable in my country if that's the reason of the problem.

import caffe, error _message.so

I installed caffe from source code on my Mac os x, but when I type this command:
python -c "import caffe"
I got this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/junhao.wen/Hao/Docker/Caffe/Caffe_source/caffe/python/caffe/__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File "/Users/junhao.wen/Hao/Docker/Caffe/Caffe_source/caffe/python/caffe/pycaffe.py", line 15, in <module>
import caffe.io
File "/Users/junhao.wen/Hao/Docker/Caffe/Caffe_source/caffe/python/caffe/io.py", line 8, in <module>
from caffe.proto import caffe_pb2
File "/Users/junhao.wen/Hao/Docker/Caffe/Caffe_source/caffe/python/caffe/proto/caffe_pb2.py", line 7, in <module>
from google.protobuf import descriptor as _descriptor
File "/Users/junhao.wen/anaconda2/lib/python2.7/site-packages/protobuf-3.1.0-py2.7-macosx-10.6-x86_64.egg/google/protobuf/descriptor.py", line 46, in <module>
from google.protobuf.pyext import _message
ImportError: dlopen(/Users/junhao.wen/anaconda2/lib/python2.7/site-packages/protobuf-3.1.0-py2.7-macosx-10.6-x86_64.egg/google/protobuf/pyext/_message.so, 2): Symbol not found: __ZNK6google8protobuf10TextFormat17FieldValuePrinter10PrintBytesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Referenced from: /Users/junhao.wen/anaconda2/lib/python2.7/site-packages/protobuf-3.1.0-py2.7-macosx-10.6-x86_64.egg/google/protobuf/pyext/_message.so
Expected in: flat namespace
in /Users/junhao.wen/anaconda2/lib/python2.7/site-packages/protobuf-3.1.0-py2.7-macosx-10.6-x86_64.egg/google/protobuf/pyext/_message.so
Any suggestion will be appreciated:)
Thanks in advance
Make sure that the Python path is pointing to $CAFFE_HOME/Python

Resources