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

Application crash when there are files with Chinese characters in their names? #199

Open
quietbamboo opened this issue Dec 2, 2024 · 0 comments

Comments

@quietbamboo
Copy link

anylabeling -o labels images/
2024-11-30 16:59:07.183 python[17931:5340882] +[IMKClient subclass]: chose IMKClient_Modern
2024-11-30 16:59:07.183 python[17931:5340882] +[IMKInputSession subclass]: chose IMKInputSession_Modern
2024-11-30 17:00:25.959 python[17931:5340882] error messaging the mach port for IMKCFRunLoopWakeUpReliable
2024-11-30 17:46:10.667 python[17931:5340882] The class 'NSOpenPanel' overrides the method identifier. This method is implemented by class 'NSWindow'
Traceback (most recent call last):
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/anylabeling/views/labeling/label_widget.py", line 2454, in open_folder_dialog
self.import_image_folder(target_dir_path)
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/anylabeling/views/labeling/label_widget.py", line 2506, in import_image_folder
for filename in self.scan_all_images(dirpath):
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/anylabeling/views/labeling/label_widget.py", line 2537, in scan_all_images
images = natsort.os_sorted(images)
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/natsort.py", line 839, in os_sorted
return sorted(seq, reverse=reverse, key=os_sort_keygen(key))
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/utils.py", line 341, in natsort_key
return string_func(val)
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/utils.py", line 552, in
return lambda x: tuple(map(str_split, path_splitter(x)))
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/utils.py", line 523, in func
return final_transform(g, original) # Apply the final transform.
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/utils.py", line 776, in func
return tuple(split_val)
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/utils.py", line 577, in sep_inserter
first = next(iterator)
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/compat/fastnumbers.py", line 74, in
return (fast_int(y, key=on_fail) for y in x)
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/compat/fake_fastnumbers.py", line 116, in fast_int
return _uni(x, key(x)) if len(x) == 1 else key(x)
File "/opt/miniconda3/envs/label/lib/python3.9/site-packages/natsort/utils.py", line 841, in
return partial(reduce, lambda res, f: f(res), functions)
OSError: [Errno 22] Invalid argument
Abort trap: 6

@quietbamboo quietbamboo changed the title Application crash when there are files with Chinese characters? Application crash when there are files with Chinese characters in their names? Dec 2, 2024
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