RDO Stack Exception: UnboundLocalError: local variable 'logFile' referenced before assignment

Issue:

When you install RDO stack on CentOS, you may encounter following error.

Error:

[root@localhost ~]# packstack --allinone

ERROR:root:Failed to load plugin from file prescript_000.py

ERROR:root:Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 884, in loadPlugins

    moduleobj = __import__(moduleToLoad)

  File "/usr/lib/python2.7/site-packages/packstack/plugins/prescript_000.py", line 35, in <module>

    from packstack.modules.documentation import update_params_usage

  File "/usr/lib/python2.7/site-packages/packstack/modules/documentation.py", line 20, in <module>

    from docutils import core

  File "/usr/lib/python2.7/site-packages/docutils/core.py", line 20, in <module>

    from docutils import frontend, io, utils, readers, writers

  File "/usr/lib/python2.7/site-packages/docutils/frontend.py", line 41, in <module>

    import docutils.utils

  File "/usr/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>

    import docutils.io

  File "/usr/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>

    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput

  File "/usr/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 46, in <module>

    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]

  File "/usr/lib64/python2.7/locale.py", line 511, in getdefaultlocale

    return _parse_localename(localename)

  File "/usr/lib64/python2.7/locale.py", line 443, in _parse_localename

    raise ValueError, 'unknown locale: %s' % localename

ValueError: unknown locale: UTF-8


ERROR:root:Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 949, in main

    loadPlugins()

  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 892, in loadPlugins

    raise Exception("Failed to load plugin from file %s" % item)

Exception: Failed to load plugin from file prescript_000.py



ERROR : Failed to load plugin from file prescript_000.py

Traceback (most recent call last):

  File "/usr/bin/packstack", line 15, in <module>

    run_setup.main()

  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 1019, in main

    print(output_messages.ERR_CHECK_LOG_FILE_FOR_MORE_INFO % (logFile))

UnboundLocalError: local variable 'logFile' referenced before assignment


Solution:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8


你可能感兴趣的:(openstack)