Posts

Showing posts with the label pyqt5

How to fix this errror builtins.TypeError: expected str, bytes or os.PathLike object, not builtin_function_or_method

How to fix this errror builtins.TypeError: expected str, bytes or os.PathLike object, not builtin_function_or_method I have a code that allow user to select from desired path folder and display in a QlistWidget the existing docx files. The problem is that the when the user select a file the system must return the full path of the file. But instead it display the below error: builtins.TypeError: expected str, bytes or os.PathLike object, not builtin_function_or_method i know that the error is in FileListSelected function in this line : p = pathlib.Path(self.fullPath.index) but do not know how to fix it. examples this is the result of the CheckPath print: where these are the existing files in the Download directory. ========================================= ========================================= ========================================= code: from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import (QMimeData) from PyQt5.QtWidgets import (QApplication, QCheckBox, QColo...