Error reading wallet file (malformed contents)
Open
Nobody has claimed this yet.
bug 🐞
topic-walletstorage 💾
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
Crash Report
This crash report was reported through the automatic crash reporting system 🤖
Traceback
File "/data/user/0/org.electrum.electrum/files/app/crystax_python/site-packages/kivy/core/window/window_sdl2.py", line 727, in mainloop
self._mainloop()
File "/data/user/0/org.electrum.electrum/files/app/crystax_python/site-packages/kivy/core/window/window_sdl2.py", line 460, in _mainloop
EventLoop.idle()
File "/data/user/0/org.electrum.electrum/files/app/crystax_python/site-packages/kivy/base.py", line 340, in idle
self.dispatch_input()
File "/data/user/0/org.electrum.electrum/files/app/crystax_python/site-packages/kivy/base.py", line 325, in dispatch_input
post_dispatch_input(*pop(0))
File "/data/user/0/org.electrum.electrum/files/app/crystax_python/site-packages/kivy/base.py", line 291, in post_dispatch_input
wid.dispatch('on_touch_up', me)
File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
File "/data/user/0/org.electrum.electrum/files/app/crystax_python/site-packages/kivy/uix/behaviors/button.py", line 179, in on_touch_up
self.dispatch('on_release')
File "kivy/_event.pyx", line 703, in kivy._event.EventDispatcher.dispatch
File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
File "kivy/_event.pyx", line 1098, in kivy._event.EventObservers._dispatch
File "/data/user/0/org.electrum.electrum/files/app/crystax_python/site-packages/kivy/lang/builder.py", line 64, in custom_callback
exec(__kvlang__.co_value, idmap)
File "<string>", line 39, in <module>
File "./electrum/gui/kivy/uix/dialogs/wallets.py", line 64, in open_wallet
app.load_wallet_by_name(self.ids.wallet_selector.selection[0])
File "./electrum/gui/kivy/main_window.py", line 521, in load_wallet_by_name
wallet = self.daemon.load_wallet(path, None)
File "./electrum/daemon.py", line 234, in load_wallet
storage = WalletStorage(path, manual_upgrades=True)
File "./electrum/storage.py", line 154, in __init__
self.load_data(self.raw)
File "./electrum/storage.py", line 180, in load_data
t = self.get('wallet_type')
File "./electrum/storage.py", line 81, in get
v = self.data.get(key)
AttributeError: 'list' object has no attribute 'get'
Reporter
This issue was reported by 1 user(s):
| Electrum Version | Python Version | Operating System | Wallet Type | Locale | Stack |
|---|---|---|---|---|---|
| 3.2.3 | 3.6.4 (default, Mar 1 2018, 10:42:21) [GCC 5.3 20151204] | Android 7.0 on PCD PCD508 (PCD_PCD508_V07_20170523_141726) | standard | ? | ℹ |
Additional Information
The reporting user(s) did not provide additional information.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in electrum/storage.py at WalletStorage.load_data and get, then follow the loading path from electrum/daemon.py. Reproduce the Android-reported failure with a malformed wallet file and verify that opening it no longer raises the shown AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100