none
SQL Server 2017 Python tutorial not working RRS feed

  • Question

  • I'm following the tutorial https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/use-python-revoscalepy-to-create-model?view=sql-server-2017, and got the following error:

    connectionString=Driver=SQL Server;Server=localhost\MSSQLSERVER2017;Database=flightdata;Trusted_Connection=True;
    RxInSqlServer Compute Context:
    ------------------------------
    connection_string: "Driver=SQL Server;Server=localhost\MSSQLSERVER2017;Database=flightdata;Trusted_Connection=True;"
    num_tasks: 4
    execution_timeout_seconds: 0
    wait: True
    console_output: False
    auto_cleanup: False
    packages_to_load: []
    description: "sqlserver"
    version: "1.0"
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER2017\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 462, in rx_sql_satellite_pool_call
        exec(inputfile.read())
      File "<string>", line 29, in <module>
      File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER2017\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 871, in rx_remote_call
        results = rx_resumeexecution(state_file = inputfile)
      File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER2017\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 552, in rx_resumeexecution
        return _state["function"](**_state["args"])
      File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER2017\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 291, in rx_native_call
        ret = px_call(functionname, params)
    RuntimeError: revoscalepy function failed.
    ====== CA5971NB ( process 0 ) has started run at 2019-01-04 13:17:26 Eastern Standard Time ======

    CA5971NB [26924]: Rows Processed: 100ERROR: Character data cannot be used in computations: 'ArrDelay'.
    ERROR: Character data cannot be used in computations: 'ArrDelay'.
    ERROR: Character data cannot be used in computations: 'ArrDelay'.
    ERROR: Character data cannot be used in computations: 'ArrDelay'.
    ERROR: Character data cannot be used in computations: 'ArrDelay'.
    ERROR: Character data cannot be used in computations: 'ArrDelay'.
    Caught exception in file: CxAnalysis.cpp, line: 6660. ThreadID: 6368 Rethrowing.
    Caught exception in file: CxAnalysis.cpp, line: 5835. ThreadID: 6368 Rethrowing.
    Caught exception in file: CxAnalysis.cpp, line: 5384. ThreadID: 6368 Rethrowing.
    LinMod function failed. Please see the console output for more information.

    Rows Read: 100, Total Rows Processed: 100, Total Chunk Time: 0.005 seconds 
    Traceback (most recent call last):

      File "<ipython-input-2-25f45bfd6765>", line 1, in <module>
        runfile('C:/SPE/.spyder-py3/temp.py', wdir='C:/SPE/.spyder-py3')

      File "C:\Program Files\Microsoft\PyForMLS\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
        execfile(filename, namespace)

      File "C:\Program Files\Microsoft\PyForMLS\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
        exec(compile(f.read(), filename, 'exec'), namespace)

      File "C:/SPE/.spyder-py3/temp.py", line 54, in <module>
        test_linmod_sql()

      File "C:/SPE/.spyder-py3/temp.py", line 51, in test_linmod_sql
        predict = rx_predict(linmod, data = rx_import(input_data = data_source))

      File "C:\Program Files\Microsoft\PyForMLS\lib\site-packages\revoscalepy\utils\RxFunctionUtils.py", line 8, in wrapper
        return func(*args,**kwds)

      File "C:\Program Files\Microsoft\PyForMLS\lib\site-packages\revoscalepy\functions\RxPredict.py", line 569, in rx_predict
        params['xdf_compression_level'], params['compute_context'], **other_params)

      File "C:\Program Files\Microsoft\PyForMLS\lib\site-packages\revoscalepy\utils\RxFunctionUtils.py", line 8, in wrapper
        return func(*args,**kwds)

      File "C:\Program Files\Microsoft\PyForMLS\lib\site-packages\revoscalepy\functions\RxPredict.py", line 156, in rx_predict_default
        xdf_compression_level, compute_context, **kwargs)

      File "C:\Program Files\Microsoft\PyForMLS\lib\site-packages\revoscalepy\functions\RxPredictBase.py", line 326, in __init__
        raise ValueError("The model object does not contain any estimated coefficients")

    ValueError: The model object does not contain any estimated coefficients

    Please advise what's wrong? Any solution?

    Friday, January 4, 2019 6:18 PM