argparse not consistent
The deseed command line option doesn't work. The error message is "Remove the existing wallet first!". This happens in both 2.6.4 and 2.7.1
indeed. is there still a use case for that command? I would rather like to remove it
it makes it easy to create watching only wallets. but of course it's your choice to keep it around or not.
well, if it was broken since the 2.6.4 release and nobody complained, I suppose it's not really used. if you need to create a watching only wallet from the command line, you can do like this:
MPK=$(electrum getmpk)
electrum -w watching_only restore $MPK
I'm sure it can be done with grep and cut. But what you've written above won't work for a number of reasons. For one the output of getmpk is json. Second -w usually has to go after commands now.
I guess I'll close this since you've decided to deprecate the deseed command.
this commit should make it work with pipes: e0ba4a967c112bcd59382fc10ce6accd7a67fce3
electrum getmpk | electrum -w watching_only restore -
are you on OSX ? on linux -w does not have to go after commands.
and no, the output of getmpk is not json, unless you are using an old version
indeed you are right. these were problems in 2.6.4. my bad.
no I just checked even in 2.7.1 some commands don't like -w before the command. create and restore for example.
are you on OSX or linux?
linux. opensuse is running 2.6.4. debian vm running 2.7.1
debian install is jessie (8)
do the other commands accept -w before the command? what happens with create and restore, do they throw an error?
deseed command removed here: df6dae90d6ecc54f990d0cbfe116708c96d57fd5
This is the error that I get on create and restore:
electrum -w test7 create
Error: Remove the existing wallet first!
test7 doesn't exist. it thinks i mean the default wallet file. getseed and getmasterprivate also don't work with -w ahead of the command. they all give output based on the default wallet file rather than the one specified in -w. I bet there are others like these too. Is there some common command line parsing function where this bug might be?
it uses a python module called argparse. do you have the version of argparse that comes originally with python?
do you have the version of argparse that comes originally with python?
how would i go about finding this out?
run python:
>>> import argparse
>>> argparse._version__
mine is 1.1
1.1 here too. python version is 2.7.9