File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/gui/qt/__init__.py", line 207, in wrapper
    return func(self, *args, **kwargs)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/gui/qt/__init__.py", line 233, in start_new_window
    wallet = wizard.run_and_get_wallet()
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/gui/qt/installwizard.py", line 321, in run_and_get_wallet
    self.run(action)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/base_wizard.py", line 96, in run
    f(*args)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/base_wizard.py", line 148, in upgrade_storage
    self.waiting_dialog(do_upgrade, _('Upgrading wallet format...'), on_finished=on_finished)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/gui/qt/installwizard.py", line 497, in waiting_dialog
    on_finished()
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/base_wizard.py", line 141, in on_finished
    raise exc
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/base_wizard.py", line 145, in do_upgrade
    self.storage.upgrade()
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/util.py", line 367, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/util.py", line 363, in do_profile
    o = func(*args, **kw_args)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/storage.py", line 377, in upgrade
    self.write()
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/util.py", line 367, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/util.py", line 363, in do_profile
    o = func(*args, **kw_args)
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/storage.py", line 122, in write
    self._write()
  File "/tmp/.mount_electre6qj8u/usr/lib/python3.6/site-packages/electrum/storage.py", line 134, in _write
    with open(temp_path, "w", encoding='utf-8') as f: