tags:

views:

433

answers:

2

Hi i was trying to install SOAPpy module on my mac for python...... i installed xml and fpconst and tried installing this SOAPpy module, but i was getting the error... as below: venj:SOAPpy-0.12.0 venkata$ python setup.py build

Traceback (most recent call last):

File "setup.py", line 8, in from SOAPpy.version import version File "/Applications/SOAPpy-0.12.0/SOAPpy/init.py", line 5, in from Client import * File "/Applications/SOAPpy-0.12.0/SOAPpy/Client.py", line 46 from future import nested_scopes

SyntaxError: from future imports must occur at the beginning of the file

venj:SOAPpy-0.12.0 venkata$ python setup.py install

Traceback (most recent call last): File "setup.py", line 8, in from SOAPpy.version import version File "/Applications/SOAPpy-0.12.0/SOAPpy/init.py", line 5, in from Client import * File "/Applications/SOAPpy-0.12.0/SOAPpy/Client.py", line 46 from future import nested_scopes SyntaxError: from future imports must occur at the beginning of the file

Hey please suggest me how to solve this error.

A: 

That looks like a bug in SOAP.py from future must be at the beginning of the file SOAP.py bug see python language docs

Mark
+1  A: 

Had the same problem.

You have to "future import" to the beginning of everyfile where it's stated.

There should be a patch for that.

PhilGo20
Samme issue, manually editing of the Client.py, Types.py and Server.py and moving the 'from __future__ import nested_scopes' line at the beginning solved the problem.
Davide Gualano