如何修复 "AttributeError(name) from None"

How to fix "AttributeError(name) from None"

我正在使用 pynput 并试图让鼠标点击,为此我从 pynput 导入:

from pynput.mouse import Button, Controller

然后在第 8 行,我这样做:

button = Button.Left

结果,我得到了这个错误:

Traceback (most recent call last):
  File "C:/FILEPATH.py", line 8, in <module>
button = Button.Left
      File "C:\Program Files (x86)\Python\Python37-32\lib\enum.py", line 346, in __getattr__
raise AttributeError(name) from None
    AttributeError: Left

你知道我做错了什么,或者这里缺少什么吗?

(我用pycharm IDE)

单看the docs,应该是Button.left小写l而不是Button.Left大写l