Can't show image with opencv, could not connect to display - qt

I'm running local python script where I try to read an image and show it on my screen. Instead of opening the image I get an error every time. This is how I read and display the image with opencv:
image = cv2.imread("images/jp.png")
cv2.imshow("Image", image)
And this is the error I get:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/username/.venv/pyimage/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
Running with export QT_DEBUG_PLUGINS=1 gives me a mile long report where are lots and lots of objects like these (just to show a few):
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/zipnote"
"Failed to extract plugin meta data from '/usr/bin/zipnote'"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/zipsplit"
"Failed to extract plugin meta data from '/usr/bin/zipsplit'"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/zjsdecode"
"Failed to extract plugin meta data from '/usr/bin/zjsdecode'"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/zless"
QElfParser: '/usr/bin/zless' is not an ELF object
"'/usr/bin/zless' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/zmore"
QElfParser: '/usr/bin/zmore' is not an ELF object
"'/usr/bin/zmore' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/znew"
QElfParser: '/usr/bin/znew' is not an ELF object
"'/usr/bin/znew' is not an ELF object"
not a plugin

Related

Cannot read properties of undefined (reading 'current')

I'm using NeXTs and sanity for this project; Yesterday This code was worked but I delete the node modules folder for sending the project to a friend
But today when I reinstall the Node module folder it shows me this error and I can't find why it doesn't work!!
The error look like this
This the code for get data from sanity
And This is the code for fetching data
i try to reinstall node module packages for many time i'ma using --legacy-peer-deps but the error Doesn't disappear

nbsphinx causes build to fail when building Jupyter Notebooks

Details
I am getting a build failure of my read-the-docs that I don't understand. The assertion of "verbatim" in line 2151 of nbsphinx.py is causing the build failure. So the build fails when I try to include the Jupyter Notebook tutorials I created. I compared current versions of the tutorials to previous versions which had not caused the build to fail, and I can't find a difference that could account for the current failure.
Read the Docs project URL: lofti_gaia
Build URL: https://github.com/logan-pearce/lofti_gaia
Read the Docs username: logan-pearce
Expected Result
A passing build including *.ipynb files
Actual Result
Build failed at line 2151 of nbsphinx.py due to assertion of 'Verbatim' failing.
Terminal output:
Running Sphinx v4.1.2
loading translations [en]... done
making output directory... done
WARNING: html_static_path entry '_static' does not exist
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing lofti_gaia.tex... index installation tutorials/QuickStart tutorials/Tutorial api lofti loftitools
resolving references...
done
writing... failed
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/lofti-gaia/conda/latest/lib/python3.7/site-packages/nbsphinx.py", line 2151, in depart_codearea_latex
assert 'Verbatim' in lines[0]
AssertionError
The full traceback has been saved in /tmp/sphinx-err-x1h83s3m.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
According to the github issue 584 for nbsphinx (https://github.com/spatialaudio/nbsphinx/issues/584), this is due to a compatibility issue with sphinx 4.1.0. It can be gotten around by requiring sphinx version 4.0.2.
So in my requirements.txt file, I included sphinx==4.0.2, after which the build passes. So now my requirements.txt file looks like:
numpy
matplotlib
astropy>=4.0.1.post1
astroquery>=0.4
sphinx==4.0.2
ipython==7.19.0
nbsphinx>=0.8.6
and the build passes.
I have encountered the same issue. I did not solve it with .ipynb format, but converting the jupyter notebook to .rst format works.
May it helps

"No decoder available for type 'video/x-h264

I am running qt video player I made but every time I load a mp4 file or mp3 it gives me this error.
MP4:
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)2.1, profile=(string)constrained-baseline, codec_data=(buffer)0142c015ffe100176742c015da06025b011000000300100000030320f162ea01000468ce3c80, width=(int)384, height=(int)288, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'."
Error: "Your GStreamer installation is missing a plug-in."
MP3:
Warning: "No decoder available for type 'audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true'."
Error: "Your GStreamer installation is missing a plug-in."
By the way I am on Centos 7.9.2009 core if that has to do with anything
The answer to this is that media programs should be compiled on windows. Or if your really dedicated to it, include every .h file for gstreamer in your program and carry around those files everywhere the program goes

Wine Cannot Load the Necessary Libraries in a Google Colab Instance

I have a notebook in Google Colab I am trying to use run a windows program, but I always get the same library error:
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
I have tried to !find libtcmalloc.so.4 libtcmalloc-minimal4 but never seem to locate the library I need anywhere on the system. I had assumed that libtmalloc was installed with libgoogle-perftools-dev but I guess not?

An error occurred while processing the signatures for the file

I have Java EE Eclipse Indigo installed and am trying to use Help->Install New Software to install the SpringSource Tool Suite from the update site http://dist.springsource.com/release/TOOLS/update/e3.7
I have java 1.7.0_45 installed in use by Eclipse.
When I click "Finish", the Installing Software progress indicator displays and it goes about 49% of the way to completion before getting
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,org.grails.ide.eclipse.core,3.6.3.201411271013-RELEASE.
Error reading signed content:C:\Users\BARRET~1.REE\AppData\Local\Temp\signatureFile3011079682847967573.jar
An error occurred while processing the signatures for the file: C:\Users\BARRET~1.REE\AppData\Local\Temp\signatureFile3011079682847967573.jar
The last 3 lines are duplicated for around 20 different artifacts/jar files.
In my C:\Users directory, I have both a BARRETT~1~REE\AppData\Local\Temp directory and a barrett.reed\AppData\Local\Temp directory. It looks like the files are being downloaded to barrett.reed\AppData\Local\Temp. Perhaps that is the issue? Any way to resolve this?
Thanks in advance,
B.J. Reed

Resources