Forum Discussion

vikram_u_k's avatar
vikram_u_k
Contributor
9 years ago

Method or Attribute Not Found for Python

Hi Support,

 I am extending the functionality to generate a PDF using Testcomplete11.31. Using the Reportlab pdfgen example we are able to create a PDF using Python 2.7.

 

With 11.31, the python environment 3.4 is updated with the pdfgen module. However invoking the file from the Unittest generates a "Runtime error" for the Object Method or Attribute not available.  With the Watch window i am able to view that the method c.save exists and is in scope.

 

I am aware of this answer. Could any pointers be provided to debug this issue?.

  • baxatob's avatar
    baxatob
    9 years ago

    Hi,

     

    Locals panel provides local variables for your current debug scope. And according to this save is a variable, but you have called it as a method. There is something wrong in your code. Can you show the full code of your script?

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    Can you provide full code of your PDFCreate script?

    • vikram_u_k's avatar
      vikram_u_k
      Contributor

      Hi Baxatob,

        The local watch window lists the method c.save. 

       

      I am able to generate a PDF using Py2.7.11 but not using the Testcomplete IDE. reportgen package is loaded into the Python 3.0 folder in Testcomplete bin folder path.

      • baxatob's avatar
        baxatob
        Community Hero

        Hi,

         

        Locals panel provides local variables for your current debug scope. And according to this save is a variable, but you have called it as a method. There is something wrong in your code. Can you show the full code of your script?