'Why am I encountering this syntax error when importing AdCreative in this one-liner?

I've been trying to import class AdCreative as instructed in official Facebook API documentation and encountered this error. I am currently using python 3.9.7. I thank you in advanced for any help!

This here is the code:

from facebookads.adobjects.adcreative import AdCreative

And this is the error:

Traceback (most recent call last):

File "/Users/sanjin/opt/anaconda3/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3444, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "/var/folders/bb/y6yh1_mj0kl5f9_ffwbvcrkm0000gq/T/ipykernel_29860/1746211395.py", line 1, in <module>
from facebookads.adobjects.adcreative import AdCreative

File "/Users/sanjin/opt/anaconda3/lib/python3.9/site-packages/facebookads/adobjects/adcreative.py", line 22, in <module>
from facebookads.adobjects.abstractcrudobject import AbstractCrudObject

File "/Users/sanjin/opt/anaconda3/lib/python3.9/site-packages/facebookads/adobjects/abstractcrudobject.py", line 564
params=None, async=False, include_summary=True,
             ^
SyntaxError: invalid syntax

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source