我正在尝试执行ansible2 commnads ...
当我做:
ansible-playbook -vvv -i my/inventory my/playbook.yml
Run Code Online (Sandbox Code Playgroud)
我明白了:
意外的异常:名称'basestring'未定义完整的回溯是:
Run Code Online (Sandbox Code Playgroud)Traceback (most recent call last): File "/usr/local/bin/ansible-playbook", line 85, in <module> sys.exit(cli.run()) File "/usr/local/lib/python3.4/site-packages/ansible/cli/playbook.py", line 150, in run results = pbex.run() File "/usr/local/lib/python3.4/site-packages/ansible/executor/playbook_executor.py", line 87, in run self._tqm.load_callbacks() File "/usr/local/lib/python3.4/site-packages/ansible/executor/task_queue_manager.py", line 149, in load_callbacks elif isinstance(self._stdout_callback, basestring): NameError: name 'basestring' is not defined
这是ansible --version:
ansible 2.0.0.2
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
Run Code Online (Sandbox Code Playgroud)
这是 python --version
Python 3.4.3
Run Code Online (Sandbox Code Playgroud) 我想自定义我的 pytest 的输出名称以包含我的装置名称
所以我有
def test_t1(
when_creating_a_project_from_a_sales_handoff,
with_a_new_customer,
and_no_conflicting_data_exists,
create_project):
it_will_create_a_customer_with_the_releavant_information()
it_will_create_a_project_that_references_the_newly_created_customer()
Run Code Online (Sandbox Code Playgroud)
我希望显示的测试名称是某个版本
when_creating_a_project_from_a_sales_handoff
with_a_new_customer
and_no_conflicting_data_exists
create_project
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?我尝试创建
@fixture
def namer(request):
request.node.name = 'test_foo'
Run Code Online (Sandbox Code Playgroud)
但没有骰子,它没有改变测试显示名称
我看到应该支持为 C++ 生成的 protobuf 阅读器创建 python 包装器。
从http://yz.mit.edu/wp/fast-native-c-protocol-buffers-from-python/ 我找到了一种通过设置环境变量来打开支持的简单方法:
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
如果我这样做,我会收到以下错误:
import pyFileLib.db_proc_geo_pb2
File "C:\sandbox\PrortoBuf\lib\pyFileLib\db_proc_geo_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "c:\python\winpython-64bit-3.6.3.0qt5\python-3.6.3.amd64\lib\site-packages\google\protobuf\descriptor.py", line 46, in <module>
from google.protobuf.pyext import _message
ImportError: cannot import name '_message'
Run Code Online (Sandbox Code Playgroud)
我看到了一种扩展 protoc 生成器以本地生成 fastpython 输出的方法:https : //github.com/Cue/fast-python-pb
git clone https://github.com/Cue/fast-python-pb.git
cd fast-python-pb
python setup.py install
Run Code Online (Sandbox Code Playgroud)
尝试使用 --fastpython_out 运行 protoc 时出现以下错误:
ModuleNotFoundError: No module named 'plugin_pb2'
--fastpython_out: protoc-gen-fastpython: Plugin failed with status code 1.
Run Code Online (Sandbox Code Playgroud)
看起来这与以下内容有关:https : //groups.google.com/forum/#!topic/protobuf/5Ywz8gwn9Kk
python …
我只需要为几个显示字母的切换按钮提供图标(特别是代表工作日的 MTWRFSS),但我在 flutter 和 font Awesome 包中找不到任何标准图标。