su nova -s /bin/sh -c "nova-manage cell_v2 create_cell --name cell1 --verbose" An error has occurred: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 2708, in main ret = fn(*fn_args, **fn_kwargs) File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1441, in create_cell disabled=disabled) File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 307, in __init__ setattr(self, key, kwargs[key]) File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 72, in setter field_value = field.coerce(self, name, value) File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 209, in coerce return self._type.coerce(obj, attr, value) File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 275, in coerce return six.text_type(value) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 49: ordinal not in range(128)
时间: 2023-12-23 13:04:36 浏览: 142
Android-LogCat-tool.zip_-baijiahao_android logcattool_logcat_log
根据错误提示,这是一个UnicodeDecodeError错误,指定的字符串无法正确解码为ASCII字符集。可能是由于在字符串中使用了非ASCII字符,导致解码失败。您可以尝试使用Python的unicode()函数将字符串转换为Unicode格式,以避免此问题。您可以尝试使用以下命令:
su nova -s /bin/sh -c "nova-manage cell_v2 create_cell --name cell1 --verbose" 2>&1 | LC_ALL=C sed -n '1!p'
该命令将通过管道将错误输出重定向到sed命令。该sed命令将删除第一行并输出其余行,以便您可以更轻松地查看错误信息。
阅读全文