Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/electrum/gui/qt/__init__.py", line 353, in start_new_window
    wallet = self._start_wizard_to_select_or_create_wallet(path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/electrum/gui/qt/__init__.py", line 400, in _start_wizard_to_select_or_create_wallet
    db = WalletDB(storage.read(), manual_upgrades=False)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/electrum/wallet_db.py", line 72, in __init__
    self.load_data(raw)
  File "/usr/lib/python3/dist-packages/electrum/wallet_db.py", line 97, in load_data
    raise WalletFileException("Malformed wallet file (not dict)")
electrum.util.WalletFileException: Malformed wallet file (not dict)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/electrum/gui/qt/util.py", line 1090, in input_qr_from_screenshot
    scan_result = scan_qr_from_image(screen.grabWindow(0).toImage())
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/electrum/gui/qt/qrreader/__init__.py", line 63, in scan_qr_from_image
    image_y800.constBits().__int__(), image_y800.byteCount(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__int__'