Author

Topic: error loading electrum on ubuntu (Read 1832 times)

hero member
Activity: 704
Merit: 500
May 09, 2015, 09:53:10 AM
#15
Thanks for all your help, as Im a linux noob will probably just keep it on my windows comp from now

I would rather not do that.

As of version 2.1, we added atomic writes to save the wallet; it should prevent wallet file corruption.
https://github.com/spesmilo/electrum/blob/master/lib/wallet.py#L142
Unfortunately, atomic writes are only supported by posix sysytems, so that will not work on Windows.

In addition, Linux is a much more secure environment.

Cheers Thomas, I am going to reinstall it on my linux computer with the 2.1 version and see how it goes Smiley
legendary
Activity: 1896
Merit: 1355
May 02, 2015, 11:37:27 AM
#14
Have you considered using sqlite? I just looked it up and it is ACID compliant.
yes, but I am also trying to keep the number of dependencies reasonable
legendary
Activity: 3724
Merit: 1586
May 02, 2015, 08:03:43 AM
#13
As of version 2.1, we added atomic writes to save the wallet; it should prevent wallet file corruption.
https://github.com/spesmilo/electrum/blob/master/lib/wallet.py#L142
Unfortunately, atomic writes are only supported by posix sysytems, so that will not work on Windows.

Have you considered using sqlite? I just looked it up and it is ACID compliant.
legendary
Activity: 1896
Merit: 1355
May 02, 2015, 02:06:59 AM
#12
Thanks for all your help, as Im a linux noob will probably just keep it on my windows comp from now

I would rather not do that.

As of version 2.1, we added atomic writes to save the wallet; it should prevent wallet file corruption.
https://github.com/spesmilo/electrum/blob/master/lib/wallet.py#L142
Unfortunately, atomic writes are only supported by posix sysytems, so that will not work on Windows.

In addition, Linux is a much more secure environment.
hero member
Activity: 704
Merit: 500
April 30, 2015, 05:07:24 PM
#11
A little late to the game here.. but my first question would be whether you downloaded Electrum from the Ubuntu repository [always safe], or tried doing something different.

Yeah mate downloaded from repository following steps on electrums website

Lucikly had the seed and managed to restore from seed after installing again, didnt know how I broke it but thank f... for the seed Cheesy

Lesson learnt and advice to anyone else, ALWAYS write down the seed, chances are 100% that you will need it sometime in the future
hero member
Activity: 704
Merit: 500
April 30, 2015, 05:03:14 PM
#10
TypeError: compile() expected string without null bytes

That's not good. Do these return anything? (don't post anything sensitive / anything that might be a key!)

Code:
ls -l ~/.electrum/wallets/
strings ~/.electrum/wallets/default_wallet

Also, you didn't answer if you have your seed written down, do you?

Hey buddy, sorry for late reply

tried that and got a list of characters and numbers

Luckily I had the seed and after deleting and creating a new wallet it worked, phew!

Thanks for all your help, as Im a linux noob will probably just keep it on my windows comp from now
sr. member
Activity: 270
Merit: 250
April 30, 2015, 03:01:49 PM
#9
A little late to the game here.. but my first question would be whether you downloaded Electrum from the Ubuntu repository [always safe], or tried doing something different.
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
April 30, 2015, 11:51:20 AM
#8
TypeError: compile() expected string without null bytes

That's not good. Do these return anything? (don't post anything sensitive / anything that might be a key!)

Code:
ls -l ~/.electrum/wallets/
strings ~/.electrum/wallets/default_wallet

Also, you didn't answer if you have your seed written down, do you?
hero member
Activity: 704
Merit: 500
April 30, 2015, 11:47:15 AM
#7
lol nw, thanks mate tried that and got this

Traceback (most recent call last):
  File "", line 1, in
  File "/usr/lib/python2.7/ast.py", line 49, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
April 30, 2015, 11:37:22 AM
#6
thanks mate, just tried this and got

Traceback (most recent call last):
  File "", line 1, in
TypeError: replace() takes at least 2 arguments (1 given)

That's cause I messed it up (and didn't even bother testing it) Roll Eyes

Can you give this a try?
Code:
python -c "import ast;import sys;ast.literal_eval(open(sys.argv[1]).read().replace(\", '\",\",\n'\"))" ~/.electrum/wallets/default_wallet
hero member
Activity: 704
Merit: 500
April 30, 2015, 11:20:13 AM
#5
This should give a more specific error message:

Code:
python -c 'import ast;import sys;ast.literal_eval(open(sys.argv[1]).read().replace(", '",",\n'"))' ~/.electrum/wallets/default_wallet

(FYI I'm assuming 1.9.x based on OP's initial traceback.)

Also, do you have your seed?

thanks mate, just tried this and got

Traceback (most recent call last):
  File "", line 1, in
TypeError: replace() takes at least 2 arguments (1 given)
hero member
Activity: 704
Merit: 500
April 30, 2015, 11:18:37 AM
#4
can you check the content of your wallet file?
also, which version are you using?

Hi and thanks for the speedy reply, I was using version 1.9.7-1 and couldnt check the content of the wallet file

I have the seed and just about try uninstalling and using newest version, but will try to figure error before doing so, will try the thing you mentioned btchris

Thanks again for your help Smiley
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
April 30, 2015, 11:15:30 AM
#3
This should give a more specific error message:

Code:
python -c 'import ast;import sys;ast.literal_eval(open(sys.argv[1]).read().replace(", '",",\n'"))' ~/.electrum/wallets/default_wallet

(FYI I'm assuming 1.9.x based on OP's initial traceback.)

Also, do you have your seed?
legendary
Activity: 1896
Merit: 1355
April 30, 2015, 11:09:15 AM
#2
can you check the content of your wallet file?
also, which version are you using?
hero member
Activity: 704
Merit: 500
April 30, 2015, 10:21:30 AM
#1
hi guys, can anyone help

Im using electrum on ubuntu and it wont load for some reason

checked the terminal and get this:

Traceback (most recent call last):
  File "/usr/local/bin/electrum", line 204, in
    gui.main(url)
  File "/usr/local/lib/python2.7/dist-packages/electrum_gui/qt/__init__.py", line 84, in main
    storage = WalletStorage(self.config)
  File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 82, in __init__
    self.read(self.path)
  File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 123, in read
    raise IOError("Cannot read wallet file.")
IOError: Cannot read wallet file.


Any ideas on what to do to fix it?

Many thanks
Jump to: