[p4python] RE: Odd behavior on save

Wright, Richard richardw at cobaltgroup.com
Thu Sep 8 13:56:37 PDT 2005

Here is some additional info:
The fetch can fetch any client name and the save of the other client will
still work.   So, these work:
p4c.run_client('-o', 'unknown_client')
p4c.run('client', '-o', 'unknown_client')
Interestingly, if I use:
I get the same "Missing 'Client'" error on the save.  
However, if I use:
I get the following error on the call to save_client:
P4Error: Error in client specification.
Error detected at line 1.
Unknown field name 'Subgroups'.
So somehow, calls to fetch are affecting calls to save, but I don't know
what is going on in the background.

-----Original Message-----
From: Wright, Richard 
Sent: Thursday, September 08, 2005 1:19 PM
To: 'p4python at perforce.com'
Subject: Odd behavior on save

I have spent some time narrowing down this problem to the minimum that I can
come up with to recreate it, and I want to see if anyone else out there can
reproduce it.
Take the following code:
import p4

p4c = p4.P4()
updateclient = {'Client' : 'richardw_client_test',
                'Description' : 'This is a test',
                'Host' : 'SEA-RICHARDW2',
                'Update' : '2005/09/09 11:25:35',
                'Access' : '2005/09/09 11:23:32',
                'Owner' : 'richardw',
                'LineEnd' : 'local',
                'Root' : r'c:\Documents and Settings\richardw',
                'Options' : 'noallwrite noclobber nocompress unlocked
nomodtime normdir',
                'View' : ['//Tools/... //richardw_client_test/Tools/...',
                          '//Specs/... //richardw_client_test/Specs/...']}
print p4c.save_client(updateclient)

The code as above gives me the following error:
P4Error: Error in client specification.
Missing required field 'Client'.

However, if I uncomment the "fetch" line, it works.  Note that I am not
saving the results of the fetch method to anything, simply running it.  I
still pass the "updateclient" dictionary to the "save" method.  Any thoughts
about what may change when the fetch method is run?
For the record, this is on Windows 2000, Python 2.4, and p4Python 0.6 (and
the API included in that package), connecting to a 2005.1 Perforce server.
Also note that the 'richardw_client_test' client is not new but was
originally created with P4V.

Rick Wright
CM/Build Engineer
The Cobalt Group, Inc.
2200 First Avenue South
Seattle, WA 98134
richardw at cobaltgroup.com <mailto:richardw at cobaltgroup.com> 

p. 206.219.8382


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20050908/9852d5b3/attachment-0001.html>

More information about the p4python mailing list