[p4python] [P4Python] P4Python Issues !!!

C Saha csaha at ymail.com
Mon Dec 15 05:46:42 PST 2008


Hi Robert / Paul / All 


Thanks for the help ... With the suggestion given by you, I am able to compile the code smoothly in command line mode .... but strangely my web page is giving some errors ... 

========================= ERRORS ======================================================================
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 c:\deviis\inetpub\wwwroot\report\index.py in () 
   20 
 
   21 p4 = P4DbClass()
 
   22 userList = p4.checkForValidUserID()
 
   23 dircList = p4.getDirList()
 
   24 
 
userList undefined, p4 = <P4Db.P4DbClass instance at 0x00937C60>, p4.checkForValidUserID = <bound method P4DbClass.checkForValidUserID of <P4Db.P4DbClass instance at 0x00937C60>> 
 C:\DevIIS\Inetpub\WWWroot\report\P4Db.py in checkForValidUserID(self=<P4Db.P4DbClass instance at 0x00937C60>) 
  135         p4c.client = "csaha-test"
 
  136         p4c.connect()
 
  137         p4c.run("login")
 
  138 
 
  139         user_list = p4c.run("users")
 
p4c = P4 [sysbuildsvc at csaha-test perforce:1666] connected, p4c.run = <bound method P4.run of P4 [sysbuildsvc at csaha-test perforce:1666] connected> 
 C:\Python25\lib\site-packages\P4.py in run(self=P4 [sysbuildsvc at csaha-test perforce:1666] connected, *args=('login',)) 
  282     def run(self, *args):
 
  283         "Generic run method"
 
  284         return P4API.P4Adapter.run(self, *self.__flatten(args))
 
  285         
 
  286     def run_submit(self, *args):
 
global P4API = <module 'P4API' from 'C:\Python25\lib\site-packages\P4API.pyd'>, P4API.P4Adapter = <type 'P4API..P4Adapter'>, P4API.P4Adapter.run = <method 'run' of 'P4API.P4Adapter' objects>, self = P4 [sysbuildsvc at csaha-test perforce:1666] connected, self.__flatten undefined, args = ('login',) 

<class 'P4.P4Exception'>: [P4#run] Errors during command execution( "p4 login" ) [Error]: Fatal client error; disconnecting! open for write: C:\Documents and Settings\sysclearcasealbd\t3396t10.tmp: Access is denied. 


==============================================================================================


The problematic part of the code this (mentioned below) ... Full code is attached with the email (incase required) ...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def getDirList(self):

        p4c = P4.P4()
        run = p4c.run
        p4c.port = "ldnpss02283:1665"
        p4c.user = "sysbuildsvc"
        p4c.password = ""
        p4c.client = "csaha-test"
        p4c.connect()
        p4c.run("login")

        top_level_dir_list = p4c.run("dirs","//depot/FinanceIT/RegIT/*")

        all_dir_list = [] 
                  
        #print  user_list
        for item in top_level_dir_list :
            #print item['User']
            dir_to_process = item.values()
            dir_to_process = dir_to_process[0] + "/*"
            tem_dir_list = p4c.run("dirs",dir_to_process)

            for obj in tem_dir_list :
                dir_2_append = obj..values()[0]+"/..."
                all_dir_list.append(dir_2_append)

        return all_dir_list

        p4c.disconnect()

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Thanks in Advanve to all 
Chirantan



      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20081215/e21176bc/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: P4Db.py
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20081215/e21176bc/attachment-0001.ksh>


More information about the p4python mailing list