FinderSidebarEditor icon indicating copy to clipboard operation
FinderSidebarEditor copied to clipboard

Python 3.10 | MacOS BigSur | Using finder_sidebar_editor

Open MohammadEImmam opened this issue 2 years ago • 1 comments

from finder_sidebar_editor import FinderSidebar

sidebar = FinderSidebar()

sidebar.remove("iCloud")
Traceback (most recent call last):
  File "/Users/*****/PycharmProjects/findersidebar/main.py", line 5, in <module>
    sidebar.remove("iCloud")
  File "/Users/*****/PycharmProjects/findersidebar/venv/lib/python3.10/site-packages/finder_sidebar_editor/FinderSidebarEditor.py", line 174, in remove
    if to_rm.upper() == name.upper():
AttributeError: 'NoneType' object has no attribute 'upper'

Process finished with exit code 1

MohammadEImmam avatar Mar 04 '22 18:03 MohammadEImmam

Apologies for the late comment. This looks to me like either no display name was found or a None value was given to the remove method. Most likely the later, so I would try debugging that first.

Whenever I can I will add some checks to ensure that the proper parameters are given.

Ajordat avatar May 24 '22 15:05 Ajordat