Syncthing gtk nautilus extension not working out of the box

Bug #1988038 reported by Thomas Maier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
syncthing-gtk (Ubuntu)
New
Undecided
Unassigned

Bug Description

Under pop-os, which uses the ubuntu package (Version: 0.9.4.4+ds+git20220108+9023143f8b93-1) for syncthing-gtk I get this error when starting nautilus:

I SyncthingPlugin Initializing...
I SyncthingPlugin Initialized.
V Daemon Set refresh interval to 20
I SyncthingPlugin Connected to Syncthing daemon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 303, in get_background_items
    path = self._get_path(item).rstrip("/")
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 303, in get_background_items
    path = self._get_path(item).rstrip("/")
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
    path = self._get_path(file)
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 303, in get_background_items
    path = self._get_path(item).rstrip("/")
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 303, in get_background_items
    path = self._get_path(item).rstrip("/")
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 303, in get_background_items
    path = self._get_path(item).rstrip("/")
  File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
    return file.get_location().get_path().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

I was able to get it to work again by modifying /usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py as follows: I replaced the line 117

                return file.get_location().get_path().decode('utf-8')

with

                return file.get_location().get_path()

After this the plugin works with my nautlius 42.2. As I am no expert I am not sure if this is correct but so far I have not encountert any problems.

Tags: patch
Revision history for this message
Thomas Maier (thaier) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "bugfix.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.