1
我有一個簡單的腳本,它通過Python API連接到Perforce並打印連接信息。AttributeError:P4腳本中的記錄器
from P4 import P4, P4Exception
p4 = P4()
p4.port = "111"
p4.user = "xxx"
p4.client = "yyy"
p4.connect()
print p4
print p4.run("info") # here is where I get an error
我得到這個錯誤: AttributeError: logger
。這是回溯
Traceback (most recent call last):
File "p4try.py", line 17, in <module>
print p4.run("info")
File "C:\..\p4python\dist\p4python-2014.2.962887\P4.py
", line 582, in run
if self.logger:
File "C:\..\p4python\dist\p4python-2014.2.962887\P4.py
", line 516, in __getattr__
raise AttributeError(name)
AttributeError: logger
Press any key to continue
有人可以幫我嗎?
它說'「AttributeError的:有名字記錄儀沒有整數屬性」'在該行'P4 .logger = False – Tania