我正在尝试挑选一个请求对象,以便我可以在有效输入的调试器中运行我的视图代码.但是,我得到了
Can't pickle 'lock' object: <thread.lock object at 0x93ad240>
Run Code Online (Sandbox Code Playgroud)
我查看了请求对象,但无法在其中的任何位置找到thread.lock对象.有谁知道它在哪里?有没有更好的方法来解决这个问题?
此 AWS 页面建议进行以下调用:
$ aws iam update-role -–role-name ADFS-Production -–max-session-duration 14400
Run Code Online (Sandbox Code Playgroud)
当我运行这个(替换正确的角色名称)时,我得到
aws: error: the following arguments are required: --role-name
Run Code Online (Sandbox Code Playgroud)
这很令人困惑,因为论点就在那里!
$ aws --version
Run Code Online (Sandbox Code Playgroud)
在我的机器上给出
aws-cli/1.14.69 Python/3.6.4 Darwin/16.3.0 botocore/1.9.22
Run Code Online (Sandbox Code Playgroud)
我尝试使用调试器单步执行 arg 解析,看起来问题可能在于 option_string_actions 列表没有正确填充:
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/argparse.py(2093)_parse_optional()
-> if arg_string in self._option_string_actions:
(Pdb) l
2088 # if it doesn't start with a prefix, it was meant to be positional
2089 if not arg_string[0] in self.prefix_chars:
2090 return None
2091
2092 # if the option string is present in the parser, return …Run Code Online (Sandbox Code Playgroud)