Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-18840

Error: 0: pyembed: ('from __future__ imports must occur at the beginning of the file', ('<embed>

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2.2
    • Fix Version/s: 7.0.0
    • Component/s: Embedded Languages
    • Labels:
      None
    • Environment:
      platform is 6.2.0-1. embedded python

      Description

      Python generates the error given in summary, above, when the statement:

      from __future__ import print_function
      

      is NOT the 1st line in the python code file. As you can see from the following ecl embed python the above line immedicately follows the embed(python) header:

       

      IMPORT Python;
      
      string test__future__(string output_index, real desired_loss=0.999) := EMBED(Python)
         from __future__ import print_function
         return 'Completed test__future__'
      ENDEMBED;
      
      OUTPUT(test__future__('65',0.00001));
      

        Attachments

          Activity

            People

            • Assignee:
              richardkchapman Richard Chapman
              Reporter:
              tlhumphrey2 Timothy Humphrey
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: