Python TypeError: not enough arguments for format string
2017-08-12 00:00
701 查看
最近在学Python,语句:
后来google发现,后面给的参数要是元组的形式,即:
'user %s,id:%s' % self.__name, self.__id
报了个错误Python TypeError: not enough arguments for format string
一看就傻眼了,参数不够?明明是给够两个了啊后来google发现,后面给的参数要是元组的形式,即:
'user %s,id:%s' % (self.__name, self.__id)
才是对的相关文章推荐
- 解决python中TypeError: not enough arguments for format string
- Python TypeError: not enough arguments for format string
- 解决python中TypeError: not enough arguments for format string
- 解决python中TypeError: not enough arguments for format stringj
- TypeError: not enough arguments for format string
- TypeError: not enough arguments for format string
- not enough arguments for format string搞死人
- Error format not a string literal and no format arguments解决方案
- TypeError: not all arguments converted during string formatting
- The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)
- Error format not a string literal and no format arguments解决方案
- The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
- error: format not a string literal and no format arguments [-Werror=format-security]
- The method setValue(String) in the type ParamTag is not applicable for the arguments (long)
- cocos2dx android版本移植时的Error format not a string literal and no format arguments解决方案
- The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, SettingFragment, String)
- cocos2dx android版本移植时的Error format not a string literal and no format arguments解决方案
- 生成apk文件遇到的编译问题error: format not a string literal and no format arguments
- TypeError: not all arguments converted during string formatting问题解决
- Error format not a string literal and no format arguments解决方案