[英]How can I checkout a file from a changelist on perforce server using Perforce Python API's (p4python)
[英]Cannot connect to a ssl-enabled perforce server using p4python
Python版本:2.7.8 P4Python版本:P4PYTHON / NTX86 / 2014.1 / 807760(2014.1 / 807760 API)(2014/03/18)客戶端操作系統:Win2k8 Server
Python腳本:
from P4 import P4, P4Exception
p4agent = P4()
p4agent.port = "ssl:my-perforce-server.com:1666"
p4agent.user = "abc"
p4agent.password = "a$3"
p4agent.connect()
p4agent.run_login()
輸出:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\PythonSync\P4Sync.py", line 44, in <module>
getLatestRevision()
File "C:\Users\Administrator\Desktop\PythonSync\P4Sync.py", line 41, in getLatestRevision
initP4()
File "C:\Users\Administrator\Desktop\PythonSync\P4Sync.py", line 36, in initP4
p4agent.connect()
File "c:\python27\lib\site-packages\P4.py", line 678, in connect
P4API.P4Adapter.connect( self )
P4Exception: [P4.connect()] Connect to server failed; check $P4PORT.
SSL library must be at least version 1.0.1.
p4agent.identify()輸出:
Perforce - The Fast Software Configuration Management System.
Copyright 1995-2014 Perforce Software. All rights reserved.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)
See 'p4 help legal' for full OpenSSL license information
Version of OpenSSL Libraries: OpenSSL 1.0.1d 5 Feb 2013
Rev. P4PYTHON/NTX86/2014.1/807760 (2014.1/807760 API) (2014/03/18).
OpenSSL(lib)的路徑在Path變量中設置。
我還檢查了客戶端計算機上的“ p4 set”(嘗試從中連接到perforce服務器),並且看到所有環境變量都已正確設置。
有人可以讓我知道如何解決這個問題嗎?
我相信問題是您連接了錯誤的Openssl庫。 P4.identify()的輸出具有誤導性:這是使用API編譯的OpenSSL的版本,而不是您要鏈接的版本。
您從哪里獲得該版本的P4Python? 您是自己編譯的還是從其他網站下載的?
如果要為Windows Python 2.7和3.4 32位和64位使用現成的P4Python版本,請查看https://swarm.workshop.perforce.com/projects/p4pythonlib/files/p4pythonlib/bin 。 如果您對這些版本有任何疑問,請告訴我。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.