Bitcoin Forum
June 24, 2024, 09:12:03 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin-cli.exe issue  (Read 1013 times)
init1 (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 1


View Profile
July 20, 2015, 03:59:28 PM
 #1

Hello!

I have tried to execute client command by bitcoin-cli.exe into cmd


for example, simple

Quote
bitcoin-cli.exe -testnet -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=bitcoinrpc -rpcpassword=123456 getinfo

works correct

but command like this

Quote
bitcoin-cli.exe -testnet -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=bitcoinrpc -rpcpassword=123456 createmultisig 2 '["04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F16E75AE607099DFCFC573A3E7155 3BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD","041050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC 38E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F","04E086DCE7893384CBFA89FBBF7D33DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFB DEE397E123C363D140221E81610B7BD695905FBF198EDFD71A1"]'

throw exception

Quote
error: Error parsing JSON:'[04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F1
6E75AE607099DFCFC573A3E71553BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD,0
41050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC3 8
E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F,04E086DCE7893384CBFA89FBBF7D33
DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFBDEE397E123C363D140221E81610B7B D
695905FBF198EDFD71A1]'

Should I wrap it ? or ... ?

BR!


achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
July 20, 2015, 05:06:56 PM
 #2

You need to escape each quote. Put a slash / before each quote.

init1 (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 1


View Profile
July 21, 2015, 07:35:27 AM
 #3

Unfortunately it does not work

Quote
bitcoin-cli.exe -testnet -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=bitcoinrpc -rpcpassword=123456 createmultisig 2 /'[/"04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F16E75AE607099DFCFC573A3E7155 3BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD/",/"041050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC 38E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F/",/"04E086DCE7893384CBFA89FBBF7D33DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFB DEE397E123C363D140221E81610B7BD695905FBF198EDFD71A1/"]/'

Also, tried double quotes, double /, and \
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
July 21, 2015, 07:40:34 AM
 #4

Try surrounding each entire argument with unescaped quotes and use backslash escaped quotes within those like this "createrawtransaction" example:

Quote
createrawtransaction "[{\"txid\":\"1abc\",\"vout\":0}]" "{\"dest\":999.99}]"

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
init1 (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 1


View Profile
July 21, 2015, 07:45:42 AM
 #5

Thanks, also works """ instead of \"
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!