1

Tring to compile the following code:

from suds.client import Client
import time

url = 'https://webapi.allegro.pl/service.php?wsdl'
client = Client(url)

The output of the shell is:

Traceback (most recent call last):
  File "C:/Users/Kornelcia/Desktop/Python/api.py", line 3, in <module>
    from suds.client import Client
  File "C:\Users\Kornelcia\AppData\Local\Programs\Python\Python36-32\lib\site-packages\suds\client.py", line 242
    except Exception, e:
                    ^
SyntaxError: invalid syntax

How could I make it work?

Kornelia
  • 43
  • 1
  • 3
  • 1
    Looks like `suds` doesn't support Python 3.x so you'd have to use [`suds-py3`](https://pypi.python.org/pypi/suds-py3) – Cory Kramer Jun 01 '17 at 19:01

2 Answers2

1

I had the same problem. After I installed additionally the suds-jurko aswell it suddenly started working.

pip3 install suds-jurko
kar
  • 11
  • 1
-1

Try

Exception as e

Its not about suds, its python syntax error.

durdenk
  • 1,590
  • 1
  • 14
  • 36
  • 1
    The syntax error is coming from within the `suds` site-package, and is essentially just a Python version issue. – Cory Kramer Jun 01 '17 at 19:02
  • Sorry, didnt see that. Check https://stackoverflow.com/questions/5119751/in-python-whats-the-difference-between-except-exception-as-e-and-except-exc – durdenk Jun 01 '17 at 19:04