Estoy migrando unos proyectos a python sobre sql 2017, y me encontre con un problema sobre la libreria suds.
EXEC sp_execute_external_script
@language = N'Python',
@script = N'
from suds.client import Client
url="https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl"
client = Client(url)'
Salida
Msg 39004, Level 16, State 20, Line 0 Error de script 'Python' durante la ejecución de 'sp_execute_external_script' con HRESULT 0x80004004. Msg 39019, Level 16, State 2, Line 0 Error en el script externo:
Error in execution. Check the output for more information. Traceback (most recent call last): File "", line 5, in File "D:\MSSQL\MSSQL14.MSSQLSERVER\MSSQL\ExtensibilityData\MSSQLSERVER01\2BB630CA-1241-4B83-B33A-195C1B7C98A2\sqlindb.py", line 29, in transform from suds.client import Client File "D:\MSSQL\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\suds\client.py", line 242 except Exception, e: ^ SyntaxError: invalid syntax
SqlSatelliteCall error: Error in execution. Check the output for more information. Mensaje(s) STDOUT del script externo: SqlSatelliteCall function failed. Please see the console output for more information. Traceback (most recent call last): File "D:\MSSQL\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 406, in rx_sql_satellite_call rx_native_call("SqlSatelliteCall", params) File "D:\MSSQL\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 291, in rx_native_call ret = px_call(functionname, params) RuntimeError: revoscalepy function failed.
Esta en la linea en cuestion donde se produce la excepcion del archivo client.py
def create(self, name):
"""
create a WSDL type by name
@param name: The name of a type defined in the WSDL.
@type name: str
@return: The requested object.
@rtype: L{Object}
"""
timer = metrics.Timer()
timer.start()
type = self.resolver.find(name)
if type is None:
raise TypeNotFound(name)
if type.enum():
result = InstFactory.object(name)
for e, a in type.children():
setattr(result, e.name, e.name)
else:
try:
result = self.builder.build(type)
except Exception, e:
log.error("create '%s' failed", name, exc_info=True)
raise BuildError(name, e)
timer.stop()
metrics.log.debug('%s created: %s', name, timer)
return result
la version de python es 3.5.2 Continuum.