Comment 0 for bug 1826627

Revision history for this message
Steve Murphy (smurphos) wrote : Nemo verion 4.0.x + requires extensions to be Python3 compatible

Extension fails display context menu entry with Nemo 4.0.x and later. Nemo extensions for 4.0.x and later are required to be python3 compatible.

Running Nemo from a terminal on opening the right click context menu the terminal the following error is produced.

Traceback (most recent call last):
  File "/usr/share/nemo-python/extensions/folder-color.py", line 168, in get_file_items
    return self._generate_menu(items)
  File "/usr/share/nemo-python/extensions/folder-color.py", line 240, in _generate_menu
    if self._check_generate_restore(items):
  File "/usr/share/nemo-python/extensions/folder-color.py", line 297, in _check_generate_restore
    item_path = urllib.unquote(item.get_uri()[7:])
AttributeError: module 'urllib' has no attribute 'unquote'
Traceback (most recent call last):
  File "/usr/share/nemo-python/extensions/folder-color.py", line 168, in get_file_items
    return self._generate_menu(items)
  File "/usr/share/nemo-python/extensions/folder-color.py", line 240, in _generate_menu
    if self._check_generate_restore(items):
  File "/usr/share/nemo-python/extensions/folder-color.py", line 297, in _check_generate_restore
    item_path = urllib.unquote(item.get_uri()[7:])
AttributeError: module 'urllib' has no attribute 'unquote'

Workaround - in /usr/share/nemo-python/extensions/folder-color.py replace all instances of urllib.unquote with urllib.parse.unquote e.g

sudo sed -i "s|urllib.unquote|urllib.parse.unquote|g" /usr/share/nemo-python/extensions/folder-color.py

Nemo 4.0.x is the default version in Mint Cinnamon 19.1 which uses the Bionic version of the package.

steve@steve-HP-Pavilion-g6-Notebook-PC:~$ inxi -Sxxxz
System:
  Host: steve-HP-Pavilion-g6-Notebook-PC Kernel: 4.15.0-48-generic x86_64
  bits: 64 compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.10 wm: muffin 4.0.7
  dm: LightDM 1.26.0 Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic
steve@steve-HP-Pavilion-g6-Notebook-PC:~$ nemo --version
nemo 4.0.6