powered by simpleCommunicator - 2.0.53     © 2025 Programmizd 02
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / MS SQL и модуль Python
1 сообщений из 1, страница 1 из 1
MS SQL и модуль Python
    #39994104
ivalnew
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Добрый день.

Помогите разобраться с ошибкой.

Есть 2017 сервер. На него установлен компонент Python. При выполнении кода через cmd все отрабатывает.

c:\Program Files\Microsoft SQL Server\MSSQL14.SQL1C\PYTHON_SERVICES>python.exe
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> test='Привет'
>>> print(test)
Привет
>>>

При выполнении скрипта через SSMS:

EXECUTE sp_execute_external_script
@language = N'Python',
@script = N'
test="Привет"
print(test)
'

Получаю ошибку:
Msg 39004, Level 16, State 20, Line 0
A 'Python' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
Msg 39019, Level 16, State 2, Line 0
An external script error occurred:

Error in execution. Check the output for more information.
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "C:\PROGRA~1\MICROS~1\MSSQL1~1.SQL\MSSQL\EXTENS~1\SQL1C01\DEE523C7-090F-4921-93B2-566922F94914\sqlindb.py", line 29
test="Привет"
^
IndentationError: unexpected indent

SqlSatelliteCall error: Error in execution. Check the output for more information.
STDOUT message(s) from external script:

Express Edition will continue to be enforced.
SqlSatelliteCall function failed. Please see the console output for more information.
Traceback (most recent call last):
File "C:\Program Files\Microsoft SQL Server\MSSQL14.SQL1C\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 406, in rx_sql_satellite_call
rx_native_call("SqlSatelliteCall", params)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.SQL1C\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 291, in rx_native_call
ret = px_call(functionname, params)
RuntimeError: revoscalepy function failed.

Использование внешних скриптов на MS SQL включено
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / MS SQL и модуль Python
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]