bassmanitram / actions-for-nautilus

An extension to the Gnome "Files" file manager that allows you to add arbitrary actions to the file selection context menu.
Apache License 2.0
168 stars 16 forks source link

Python3.10 type error in /var/log/syslog #11

Closed biokomiker closed 2 years ago

biokomiker commented 2 years ago

There is a small mistake filling up from time to time /var/log/syslog:

Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: Traceback (most recent call last): Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: File "/usr/share/nautilus-python/extensions/actions-for-nautilus/actions_for_nautilus.py", line 25, in get_background_items Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: return afn_menu.create_menu_items(self.config.get_config(), [file], "Background", _run_command) Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: File "/usr/share/nautilus-python/extensions/actions-for-nautilus/afn_menu.py", line 12, in create_menu_items Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: my_files = list(map(lambda file: { Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: File "/usr/share/nautilus-python/extensions/actions-for-nautilus/afn_menu.py", line 15, in <lambda> Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: "basename": os.path.basename(file.get_location().get_path()), Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: File "/usr/lib/python3.10/posixpath.py", line 142, in basename Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: p = os.fspath(p) Aug 9 22:13:48 InaUbuntu org.gnome.Nautilus[3732]: TypeError: expected str, bytes or os.PathLike object, not NoneType

It is repeated in blocks.

bassmanitram commented 2 years ago

OK, I've found the error - it occurs when you click on a shortcut/bookmark. Working on it