argument 1 must be 2-item sequence, not int

Posted xyzpeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了argument 1 must be 2-item sequence, not int相关的知识,希望对你有一定的参考价值。

看了 https://blog.csdn.net/qq_18250439/article/details/80872425  的说明,才明白为什么错了。

当使用Python3-pygame时出现TypeError: argument 1 must be 2-item sequence, not int提示

原始代码:


screen =pygame.display.set_mode(SCREEN_WIDTH,SCREEN_HEIGHT)

应改为:

screen =pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT),0,32)

 或者

screen =pygame.display.set_mode([SCREEN_WIDTH,SCREEN_HEIGHT])

感谢大神。

以上是关于argument 1 must be 2-item sequence, not int的主要内容,如果未能解决你的问题,请参考以下文章

TypeError: take(): argument 'index' (position 1) must be Tensor, not numpy.ndarray

报错解决——TypeError: LoadLibrary() argument 1 must be str, not None

Python_异常:TypeError: write() argument must be str, not list

TypeError: write() argument must be str, not bytes

TypeError: argument 1 must be an integer, not _subprocess_handle/OSError: [WinError 87]

Django admin argument to reversed() must be a sequence