TagStudio
TagStudio copied to clipboard
Replace use of os.path with pathlib
Tested on Linux (Solus) for basic functionality
good job, this was really needed 👍
@yedpodtrzitko Thanks for the comments, I think I've resolved most of them. I'll have to test with the changes and ruff-format it again.
Fixed some issues that cropped up with the modularized GUI files.
I think all the basics are working now, tested creating/opening library, adding tags/fields, and removing unlinked files (on Solus Linux)
@CyanVoxel it would be nice to merge the mypy PRs sooner or later, errors like this https://github.com/TagStudioDev/TagStudio/pull/156#issuecomment-2113988948 will be caught automatically.
I'll get that going soon here
Just a heads up, I'll be pulling #142 (a rewrite of #88) before this, which will cause some additional conflicts - I apologize in advance.
Tested basic functionality on my Linux distro (Solus) and seems to be working. At one point I did get a segfault... but it didn't happen in later testing.
Got a segmentation fault when trying to delete unlinked entries, but I couldn't reproduce the issue.
[ThumbRenderer][ERROR]: Couldn't render thumbnail for /home/icosahunter/Documents/test.txt ([Errno 2] No such file or directory: '/home/icosahunter/Documents/test.txt')
Traceback (most recent call last):
File "/home/icosahunter/Repos/TagStudio/tagstudio/src/qt/widgets/preview_panel.py", line 530, in update_widgets
raise UnidentifiedImageError
PIL.UnidentifiedImageError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/icosahunter/Repos/TagStudio/tagstudio/src/qt/ts_qt.py", line 1209, in <lambda>
lambda checked=False, entry=entry: self.select_item(
^^^^^^^^^^^^^^^^^
File "/home/icosahunter/Repos/TagStudio/tagstudio/src/qt/ts_qt.py", line 1137, in select_item
self.preview_panel.update_widgets()
File "/home/icosahunter/Repos/TagStudio/tagstudio/src/qt/widgets/preview_panel.py", line 539, in update_widgets
f"{filepath.suffix.upper()[1:]} • {format_size(os.stat(filepath).st_size)}"
^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/icosahunter/Documents/test.txt'
Start RMF: <PySide6.QtCore.QThread(0x55681a5ac5b0) at 0x7fc9d3f2d600>
TagStudio.sh: line 7: 9544 Segmentation fault (core dumped) python tagstudio/tag_studio.py