Error: NETWORK_NAME is not defined when init_indy_keys for starting node on local machine


#1

Hi all,

when I follow this document “https://github.com/hyperledger/indy-node/blob/stable/docs/start-nodes.md” to start the indy node on my local machine. when I execute “init_indy_node Alpha 0.0.0.0 9701 0.0.0.0 9702 [–seed 111111111111111111111111111Alpha]”, It throw an error like below:

Is anyone know how to set the network name? Many thanks for your help!


#2

Hi Peter, did you figure out how to fix the issue? I get the same error (on Ubuntu). I followed the steps in https://github.com/hyperledger/indy-node/blob/master/docs/start-nodes.md and could run ‘sudo apt-get install indy-node’. I set the NETWORK_NAME to be sandbox in /etc/indy/indy_config.py (not sure what is the correct network name).

sudo init_indy_node Alpha 0.0.0.0 9701 0.0.0.0 9702 [--seed 111111111111111111111111111Alpha]
Traceback (most recent call last):
  File "/usr/local/bin/init_indy_keys", line 6, in <module>
    from plenum.common.keygen_utils import initNodeKeysForBothStacks
  File "/usr/local/lib/python3.5/dist-packages/plenum/__init__.py", line 73, in <module>
    setup_plugins()
  File "/usr/local/lib/python3.5/dist-packages/plenum/__init__.py", line 45, in setup_plugins
    config = getConfigOnce()
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 106, in getConfigOnce
    return _getConfig(general_config_dir)
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 87, in _getConfig
    config.GENERAL_CONFIG_FILE))
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 32, in extend_with_external_config
    config = getInstalledConfig(*extender)
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 26, in getInstalledConfig
    spec.loader.exec_module(config)
  File "/etc/indy/indy_config.py", line 3, in <module>
    NETWORK_NAME = sandbox
NameError: name 'sandbox' is not defined

#3

Solved. The NETWORK_NAME (e.g. sandbox) must be in quotes (e.g. ‘sandbox’) in /etc/indy/indy_config.py