TypeError when embedding images with href

I am attempting to embed several SVG subimages that are linked into a larger SVG image. I went to Extensions > Images > Embed Images... and got this error:

Traceback (most recent call last):
  File "embedimage.py", line 119, in <module>
    EmbedImage().run()
  File "/snap/inkscape/7809/share/inkscape/extensions/inkex/base.py", line 140, in run
    self.save_raw(self.effect())
  File "embedimage.py", line 56, in effect
    self.embed_image(node)
  File "embedimage.py", line 66, in embed_image
    href = urllib.url2pathname(url.path)
  File "/snap/inkscape/7809/usr/lib/python3.6/urllib/request.py", line 1660, in url2pathname
    return unquote(pathname)
  File "/snap/inkscape/7809/usr/lib/python3.6/urllib/parse.py", line 630, in unquote
    if '%' not in string:
TypeError: a bytes-like object is required, not 'str'

It looks like this is due to url.path being bytes and not str:

>>> from urllib.request import url2pathname
>>> url2pathname('foo.svg')
'foo.svg'
>>> url2pathname(b'foo.svg')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/urllib/request.py", line 1662, in url2pathname
    return unquote(pathname)
  File "/usr/lib/python3.8/urllib/parse.py", line 634, in unquote
    if '%' not in string:
TypeError: a bytes-like object is required, not 'str'
Edited by Nathan Lee