我正在用python下国际象棋,我遇到了这个错误
这是我的代码:
import chess.board
board=chess.Board()
board完全错误:
Traceback (most recent call last):
File "chess.py", line 1, in <module>
import chess
File "D:\Websites\repoting\chess.py", line 3, in <module>
board=chess.Board()
AttributeError: module 'chess' has no attribute 'Board'发布于 2021-10-30 08:25:26
如果你使用import chess,你可以使用chess.Board()。但如果使用import chess.Board,则只能使用模块chess中的Board()。我希望这篇文章能帮助你和每一个读过这篇文章的人。
https://stackoverflow.com/questions/69728642
复制相似问题