labelImg
labelImg copied to clipboard
TypeError: expected str, bytes or os.PathLike object, not NoneType Aborted (core dumped)
- OS: ubuntu 20.04
- PyQt version: pyqt5==5.14.1 ; PyQt5-sip==12.11.0
I build labelImg from source in July18 - 2022 and i have a problem when i open folder contain xml annotation But i install using pip , every seem OK If you want more infomation, please let me know. Thank you Here is console log.
(base) user@PCname:~/snap/labelImg$ python labelImg.py
/home/agent/snap/labelImg/labelImg.py:213: DeprecationWarning: an integer is required (got type DockWidgetFeatures). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
self.dock.setFeatures(self.dock.features() ^ self.dock_features)
Traceback (most recent call last):
File "/home/agent/snap/labelImg/labelImg.py", line 1309, in change_save_dir_dialog
self.show_bounding_box_from_annotation_file(self.file_path)
File "/home/agent/snap/labelImg/labelImg.py", line 1182, in show_bounding_box_from_annotation_file
basename = os.path.basename(os.path.splitext(file_path)[0])
File "/home/agent/anaconda3/lib/python3.9/posixpath.py", line 118, in splitext
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Aborted (core dumped)
Hello,
Have you sovled this problem? I had the same one as you
Hello,
Have you sovled this problem? I had the same one as you
i using pip to install, and i can using labelImg
pip install also works for me, thanks!
pip install works thanks
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string.
this works, thanks
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string.
thanks a lot
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string.
Thanks, this works!!
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string.
Thanks, it works!!!
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string. thank you
The problem seems to occur after the application starts, hits the "open_dir" button to determine the image directory, and determines the save directory.
This issue was added in commit 5bc7fb9 .
As a countermeasure other than editing the code, it seems that the problem can be avoided by unchecking the "auto_save" checkbox.
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string. thank you
where does one have to change this line.... in which file? ......facinf the same error on my Mac while using labelImg
maybe here. https://github.com/heartexlabs/labelImg/blob/master/labelImg.py#L1309
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string.
Thank you, It works 👍🏽
I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string.
This really works! Even though I tried git pull from the repository it says: Already up to date! Since labelImg changed a while ago, this was one of the most efficient solutions, thxx.
what after pip install ...?
expected str, bytes or os.PathLike object, not NoneType how to resolve this i tried reinstalling it