Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video file read error #35

Open
DouglasCMHo opened this issue Dec 19, 2023 · 0 comments
Open

Video file read error #35

DouglasCMHo opened this issue Dec 19, 2023 · 0 comments

Comments

@DouglasCMHo
Copy link

DouglasCMHo commented Dec 19, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant