I get the following error when running a script grabbed from the website:
" File "p4sync.py", line 1, in <module>
from perforce import *
File "C:\Python25\lib\site-packages\perforce\results.py", line 13, in <module>
import protocols
ImportError: No module named protocols"
Am Running Python25, and 0.4 of PyPerfoce
My script:
----------
from perforce import *
p4 = Connection(port='perforce:1666')
try:
p4.connect(prog='ClientUpdater')
p4.user = 'aaaa'
try:
# Retrieve the client spec
client = Client(p4, 'bbbb')
# Update the spec
client['View'] = [('//depot/Perforce/...',
'//my-client/Perforce/...')]
# Save the updated spec
# client.save()
# Finally, sync the client
client.sync()
finally:
p4.disconnect()
except ConnectionFailed, e:
print str(e)
except PerforceError, e:
print str(e)
Logged In: NO
I realize that PyProtocols needed to be installed, but going to the website they didn't have a version for Python 2.5, and when I tried to compile the sources it required Visual Studio 7.1, which I didn't have. After using the following link: http://trac.turbogears.org/ticket/1280. I was able to run the python script.
Logged In: YES
user_id=1477305
Originator: NO
I'll try to put up a compiled Win32 Python2.5 version of PyProtocols in the downloads section.