Python Module delphixpy 1.10.2.0 - Syntax error about def async(engine) druing import import delphix_engine

  • 0
  • 1
  • Question
  • Updated 3 weeks ago
  • Answered
Hi, 
I am tryng to use the Python Module. Installed the latest version delphixpy 1.10.2.0  . 
However, not able to import the delphix_engin. 

Here is the trace . 

Traceback (most recent call last):
  File "vdb_provision_rest.py", line 6, in <module>
    from  delphixpy import delphix_engine
  File "/opt/lib/python3.7/site-packages/delphixpy/__init__.py", line 6, in <module>
    from . import web
  File "/opt/lib/python3.7/site-packages/delphixpy/web/__init__.py", line 22, in <module>
    from . import environment
  File "/opt/lib/python3.7/site-packages/delphixpy/web/environment/__init__.py", line 20, in <module>
    from delphixpy.web.environment.environment import *
  File "/opt/lib/python3.7/site-packages/delphixpy/web/environment/environment.py", line 22, in <module>
    from delphixpy.web.environment import user
  File "/opt/lib/python3.7/site-packages/delphixpy/web/environment/user/__init__.py", line 20, in <module>
    from delphixpy.web.environment.user.user import *
  File "/opt/lib/python3.7/site-packages/delphixpy/web/environment/user/user.py", line 26, in <module>
    from delphixpy import response_validator
  File "/opt/lib/python3.7/site-packages/delphixpy/response_validator.py", line 19, in <module>
    from delphixpy.job_context import wait
  File "/opt/lib/python3.7/site-packages/delphixpy/job_context.py", line 37
    def async(engine):
            ^
SyntaxError: invalid syntax


............................................................................................................

Code is 

import sys
import os
import json
import asyncio
print (sys.path)
from  delphixpy import delphix_engine






Photo of Ansamma Mathews

Ansamma Mathews

  • 292 Points 250 badge 2x thumb

Posted 3 weeks ago

  • 0
  • 1
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Official Response
I believe we still only support python2.7, but your traceback shows 3.7
Photo of Scott MacDonald

Scott MacDonald, Staff Engineer

  • 2,722 Points 2k badge 2x thumb
Official Response
The error is because "async" is a reserved keyword in Python 3.7, try a previous release of python.