[p4python] Strange problem with P4Python on Windows

Jan Van Uytven juytven at perforce.com
Mon Nov 23 13:39:59 PST 2009

So I had to migrate my build/port web application 
(http://tombstone.perforce.ca/buildport) from Linux to Windows (don't ask).

While the migration was pretty painless, during testing I immediately 
noticed that the application was no longer saving information to jobs 
properly.  I did some further testing and was able to narrow the problem 
down to the following code.  As you can see, P4Python doesn't appear to 
be saving the job properly.  This problem occurs both with the method 
below and with obtaining a new job via p4.fetch_job().

There isn't a bug filed for this and I'm reluctant to file one until I'm 
sure it's a bug, and not something else.

Does anyone have any suggestions on what I'm doing wrong?  P4Python 
doesn't behave like this on Linux, the below snippet works fine on there.




Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on


Type "help", "copyright", "credits" or "license" for more information.

>>> from P4 import P4

>>> p4 = P4()

>>> p4.port = "perforce.perforce.com:1666"

>>> p4.user = "juytven"

>>> p4.connect()

P4 [juytven at tombstone-ws perforce.perforce.com:1666] connected

>>> job = p4.run( "job", "-o", "job036786" )[0]

>>> job

{'Status': 'open', 'Subsystem': 'build-port', 'Customers': '', 'Severity': 'C',

'ReportedBy': 'juytven', 'CallNumbers': '', 'Job': 'job036786', 'ModifiedBy': 'j

uytven', 'ModifiedDate': '2009/11/23 13:01:58', 'ReportedDate': '2009/11/23 12:4

3:23', 'Type': 'SIR', 'Categories': '', 'Description': ''}

>>> job['Description'] = "test"

>>> p4.save_job(job)

['Job job036786 saved.']

>>> exit()

C:\sigil>p4 job -o job036786

# A Perforce Job Specification.


#  Job:         The job name.  'new' generates a sequenced job number.

#  Status:      Either 'open', 'closed', or 'suspended'. Can be changed.

#  User:        The user who created the job. Can be changed.

#  Date:        The date this specification was last modified.

#  Description: Comments about the job.  Required.

Job:    job036786

Status: open

User:   wyvern


        <enter description here>


More information about the p4python mailing list