希望有人能帮我。。。你知道吗
具备以下条件:
智能表_测试.py你知道吗
from pfcms.content import Content
def main():
ss = Content()
ss.smartsheet()
if __name__ == "__main__":
main()
你知道吗内容.py你知道吗
import smartsheet as ss
class Content:
""" PFCMS SmartSheet utilities """
def __init__(self):
self.token = 'xxxxxxxxxxxxxxxxxxx'
def smartsheet(self):
smartsheet = ss.Smartsheet(self.token)
但是,当我执行代码时,我得到:
python -d smartsheet_test.py
Traceback (most recent call last):
File "smartsheet_test.py", line 8, in <module>
main()
File "smartsheet_test.py", line 5, in main
ss.smartsheet()
File "/xxxxx/pfcms/pfcms/content.py", line 10, in smartsheet
smartsheet = ss.Smartsheet(self.token)
TypeError: __init__() takes exactly 1 argument (2 given)
在self
被传递到ss.Smartsheet(self.token)
时,我所能看到的就是我传递的是参数self.token
。目前我对Python的了解还不太深。非常感谢您的帮助。你知道吗
谢谢 亚历克斯
在当前工作目录中有一个名为
smartsheet.py
的文件。删除或重命名该文件,并删除任何相关的.pyc
文件。你知道吗相关问题 更多 >
编程相关推荐