0
這是我第一次嘗試運行Python腳本。錯誤:運行Python腳本時太少的參數
我嘗試從genesis.json
提示命令啓動pgeth.py
。
我得到這個錯誤:too few arguments
。
這些都是在我的Windows命令提示CMD線:
內容的cd to/CreatePrivateEthereum-master_Folder
python pgeth.py -init
> pgeth.py: error: too few arguments
pgeth.py
腳本:
def init(args):
"""init command"""
# account management
initAccount()
# init needed if there is no chaindata dir
datadir = getDataDir()
if checkDir(os.path.join(datadir, 'chaindata')):
return
geth = checkGethCommand()
options = [ "--datadir", datadir, "--networkid", "100" ]
# create the json genesis
address = getAddress()
txt = GENESIS.replace("$ADDRESS$", address)
f = open("genesis.json", "w")
f.write(txt)
f.close()
# launch the blockchain with the CustomGenesis.json file
cmdInit = [ geth ] + options + [ "init", "genesis.json"]
logging.debug("cmd: " + strCommand(cmdInit))
subprocess.call(cmdInit)
你能告訴我們你的'pgeth.py'腳本的內容嗎? – errata
請看看,我編輯了這個問題。 – user5953665