Why YOLOv8 graphs are not showing - python

This error occurred after training the yolov8 model. i need graphs after training the model.
QObject::moveToThread: Current thread (0x8f9d580) is not the object's thread (0xac491c0).
Cannot move to target thread (0x8f9d580)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/hamna/.local/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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
I tried many times but not happened

Related

How to integrate jaeger in opentelemetry python, where jaeger is running on different server or system?

It's my first time of implementing opentelemetry using OTLPExporter and jaeger UI. I'm passing opentelemetry traces to jaeger UI using OLTP protocol,it's working fine on locally.I've a question that, is it possible to pass opentelemetry data to jaeger,where jaeger is running on different instance or system.

Could not load the Qt platform plugin "xcb" in "" even though it was found while running python file from ec2 instance

Hi ,
I am trying to run a python application from aws ec2 instacne , but i am getting the below error .
sh-4.2$ python3 Landing.py
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Can some one let me know how can we solve the issue.
Thanks,
Nikhil

Python KivyMD Changing Interface after building app in smartphone

I want to compile my KivyMD application using buildozer. Before doing this, I run the application on the computer and see one interface. But after I collect it through buildozer, I see a completely different interface on my phone, and I don’t know what this is connected with. Please help, work is on fire...

Is there an easy way to scan for surrounding bluetooth devices and get their RSSI to detect proximity in Python?

We have to create a prototype of a social distancing app, but are all relatively inexperienced programmers. Does any of you have an idea to do this?
I already setup Python and Kivy for the app development.
I was already looking into Bluetooth Proximity Detection, but experiencing some troubles.
When running that:
import bluetooth
print(bluetooth.discover_devices(duration=8, lookup_names=True, flush_cache=True, lookup_class=False))
I receive this error:
ImportError: Cannot load LightAquaBlue framework, not found at /Users/thomask/PycharmProjects/Baap/lib/python3.7/site-packages/lightblue/LightAquaBlue.framework
But when trying to install Lightblue package, I get this error:
The following build commands failed: CompileC /Users/thomask/Downloads/lightblue-0.4-master/src/mac/LightAquaBlue/build/LightAquaBlue.build/Release/LightAquaBlue.build/Objects-normal/arm64/BBServiceAdvertiser.o /Users/thomask/Downloads/lightblue-0.4-master/src/mac/LightAquaBlue/BBServiceAdvertiser.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'LightAquaBlue' from project 'LightAquaBlue') (1 failure)

How to Write a Dockerfile to run Python3 + PyQt5

The story is, I have built a little Python software using Python3.8, PyQt5 and Postgres, so I am trying to create a container in order to dockerize all this stuff, I am thinking to create one Dockerfile to create a container for python + pqt5, another container just for Postgres and then using docker-compose to link everything.
The problem is, when I try to create a container for Python and PyQt5, I am facing this error.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
And this is actually the Dockerfile I am talking about
FROM python:3
COPY *.py /code/
COPY requirements.txt /code/
WORKDIR /code/
RUN apt-get update -y && apt-get upgrade -y && \
apt-get install xvfb -y
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python3", "main.py"]
This is the content of my requirements.txt
psycopg2
requests
PyQt5
I tried all the solutions I found on the web and others on the Docker Hub, but none of them gave me the expected result.
Could any good soul shed light on this problem?
Preferably with written code.
It’s not too difficult. Is the Qt software interactive?
If not, then you need to use another “dummy” platform plugin. The xcb plugin is for use with X displays only.
If yes, then you have several choices:
a. Run an X server on your desktop. Set the DISPLAY env var in the container, and forward relevant port from the server into the container. The SHM extension will not be available, so the performance will be a bit lower than running the application directly on the desktop.
b. Run a web browser client using Qt webgl streaming technology. The Qt software will run as a server in the container, and offer it’s GUI to a browser client.
c. Run the Qt application directly (natively) on the desktop, and run the necessary services in the container. Have the application communicate with the services in the container. You can either have some middleware that exposes an API, or you can talk directly to the database. That will somewhat depend on the needs of your project, and the eventual direction it’s heading.
use dockerhub
https://hub.docker.com/r/fadawar/docker-pyqt5
The image you want seems to have already been created.

Categories