Heart-rate-measurement-using-camera icon indicating copy to clipboard operation
Heart-rate-measurement-using-camera copied to clipboard

Video file read error

Open DouglasCMHo opened this issue 6 months ago • 0 comments

Describe the bug A clear and concise description of what the bug is.

When selecting the video file for input, the program cannot get the correct file path because in line 191 of GUI.py

def openFileDialog(self): self.dirname = QFileDialog.getOpenFileName(self, 'OpenFile')

The "QFileDialog.getOpenFileName(self, 'OpenFile')" will return a tuple of "(fileName, selectedFilter)" to "self.dirname"

So I modified it to

def openFileDialog(self): self.dirname = QFileDialog.getOpenFileName(self, 'OpenFile') [0]

and no more error

To Reproduce Steps to reproduce the behavior:

  1. Select Video as input
  2. Select a file for input
  3. Hit the Start button

error occurred:

File "c:/Users/dougl/OneDrive/Autoba/Heart-rate-measurement-using-camera/GUI.py", line 253, in run input.start() File "c:\Users\dougl\OneDrive\Autoba\Heart-rate-measurement-using-camera\video.py", line 17, in start self.cap = cv2.VideoCapture(self.dirname) TypeError: an integer is required (got type tuple)

Desktop (please complete the following information):

  • OS: Ubuntu and Windows 10

DouglasCMHo avatar Dec 19 '23 04:12 DouglasCMHo