社区
脚本语言
帖子详情
Pygame has no attribute key
LiMFan
2020-02-15 11:16:12
在编写飞机大战程序的时候,按照视频的代码一模一样敲的,却运行出这个错误,看了下别人的,都没出现这个错误,有大神能帮忙解答下吗?快要崩溃了,现在一直卡在这里,呜呜呜呜呜呜呜呜呜
...全文
435
2
打赏
收藏
Pygame has no attribute key
在编写飞机大战程序的时候,按照视频的代码一模一样敲的,却运行出这个错误,看了下别人的,都没出现这个错误,有大神能帮忙解答下吗?快要崩溃了,现在一直卡在这里,呜呜呜呜呜呜呜呜呜
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
LiMFan
2020-02-17
打赏
举报
回复
引用 1 楼 冰风漫天的回复:
key的首字母应该是小写的,你写大写所以找不到 你改pygame.key.get_pressed()试下
谢谢谢谢,就是大小写的问题,已经解决啦
冰风漫天
2020-02-16
打赏
举报
回复
key的首字母应该是小写的,你写大写所以找不到 你改pygame.key.get_pressed()试下
基于python3生成标签云代码解析
当在Python3中运行上述代码时,可能会出现`
Attribute
Error: 'dict' object has no
attribute
'iteritems'`的错误。为了解决这个问题,我们需要将`iteritems()`替换为`items()`: ```python return sorted(counted....
解决module '
pygame
' has no
attribute
'init'
运行python文件出现 has no
attribute
‘init’ 这个情况 import
pygame
pygame
.init() ...按视频的内容练习
pygame
的时候出现
Attribute
Error: module '
pygame
' has no
attribute
'init'这个情况 但是在po...
Attribute
Error: ‘Event‘ object has no
attribute
‘
Key
‘
外星人入侵项目编写按键事件运行时点击右键报"
Attribute
Error: ‘Event’ object has no
attribute
‘
Key
’"错误 错误代码 def _check_events(self): '''监视按键和鼠标事件''' for event in
pygame
.event.get():...
Attribute
Error: ‘dict‘ object has no
attribute
‘
key
‘
16-7 用原书代码运行,提示
Attribute
Error: 'dict' object has no
attribute
'
key
' 查了百度后,原因是原书是基于2.7版本,而我用的是python3.6. 问题出在 color_name=random.choice(lTHECOLORS.
key
s()) 这是原书...
python object has no
attribute
_Python中出现
Attribute
Error: object has no
attribute
按照书上的编写的一个python的飞船游戏 代码也都是按照书上的编写的 但就不知道问题出在哪里
Attribute
Error: 'Ship' object has no
attribute
'bullet_width'到运行飞船左右移动的时候都是没有问题的,但是到了创建...
脚本语言
37,744
社区成员
34,213
社区内容
发帖
与我相关
我的任务
脚本语言
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
复制链接
扫一扫
分享
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
试试用AI创作助手写篇文章吧
+ 用AI写文章