I have a code. Because it is very long (2500 lines) I can not throw it here but here are the libraries:

import sys
import datetime
import locale
import serial
import time
import os
import cv2
import keyboard
import threading

import google.generativeai as genai
from PyQt5 import QtWidgets, QtGui
from PyQt5.QtCore import Qt, QTimer, QTime, QUrl
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QLineEdit, QPushButton, QGridLayout, QToolButton, QToolBar
from PyQt5.QtGui import QFont, QPalette, QColor, QImage, QPixmap, QTransform, QPainter, QIcon
from PyQt5.QtMultimedia import QMediaPlayer, QMediaContent
from PyQt5.QtMultimediaWidgets import QVideoWidget
from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton, QLineEdit, QVBoxLayout, QLabel, QWidget

When I try to run the code without root (python3 filepath/filename), it waits for a long time and nothing happens. When I am root on the command line and do the same thing, the code works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.