Thrift
  1. Thrift
  2. THRIFT-1515

NameError: global name 'TApplicationException' is not defined

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9
    • Component/s: Python - Compiler
    • Labels:
      None

      Description

      The Python Thrift generator does not include imports for all the exception types it uses, namely, "TApplicationException".

      To reproduce:
      Create two Thrift services (A and B) and start them.
      Using the Python client for B, connect to A and call one of the methods from the service.

      Expected result:

      thrift.Thrift.TApplicationException: Invalid method name: 'someMethod'

      Actual Result:

      NameError: global name 'TApplicationException' is not defined
      1. thrift_1515.patch
        0.5 kB
        Atul S Vasu

        Activity

        Jake Farrell made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Jake Farrell [ jfarrell ]
        Fix Version/s 0.9 [ 12316294 ]
        Resolution Fixed [ 1 ]
        Hide
        Jake Farrell added a comment -

        Yes, this is available within trunk and will be in the 0.9 release

        Show
        Jake Farrell added a comment - Yes, this is available within trunk and will be in the 0.9 release
        Hide
        David De Caires E Freitas added a comment -

        Cool, I have the same problem, will the Fix Version be 0.9?

        Show
        David De Caires E Freitas added a comment - Cool, I have the same problem, will the Fix Version be 0.9?
        Hide
        Will Pierce added a comment -

        I attached a patch for this same fix to THRIFT-1115 which does the same thing (except uses 2 lines, to avoid going past the 80 char suggested limit of PEP8)

        I'm happy with either one

        Show
        Will Pierce added a comment - I attached a patch for this same fix to THRIFT-1115 which does the same thing (except uses 2 lines, to avoid going past the 80 char suggested limit of PEP8) I'm happy with either one
        Atul S Vasu made changes -
        Field Original Value New Value
        Attachment thrift_1515.patch [ 12521431 ]
        Hide
        Atul S Vasu added a comment -

        Patch to fix this bug.

        From r1309631
        http://svn.apache.org/repos/asf/thrift/trunk

        Show
        Atul S Vasu added a comment - Patch to fix this bug. From r1309631 http://svn.apache.org/repos/asf/thrift/trunk
        Jon Stephens created issue -

          People

          • Assignee:
            Jake Farrell
            Reporter:
            Jon Stephens
          • Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.25h
              0.25h
              Remaining:
              Remaining Estimate - 0.25h
              0.25h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development