U-SQL,Python,本地执行,"未找到设备"错误

时间:2017-08-16 12:37:49

标签: python azure u-sql

我尝试使用VS 2017在本地运行带有Python扩展的U-SQL作业。

我按照以下步骤操作:

  1. https://1drv.ms/w/s!AvdZLquGMt47g0NultCKgm38sejs

  2. https://blogs.msdn.microsoft.com/azuredatalake/2017/02/20/enabling-u-sql-advanced-analytics-for-local-execution/

  3. 然后我试着运行它:

    1. https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-python-extensions
    2. 如果我在Azure中运行它可以正常工作,但如果我尝试在本地运行它,我得到的错误是:"设备未被读取"。

      详细说明:

      Start : 2017-08-16 14:35:13
      Initialize : 2017-08-16 14:35:13
      GraphParse : 2017-08-16 14:35:13
      Run : 2017-08-16 14:35:13
      Start 'Root' : 2017-08-16 14:35:13
      End 'Root(Success)' : 2017-08-16 14:35:13
      Start '1_SV1_Extract' : 2017-08-16 14:35:13
      End '1_SV1_Extract(Error)' : 2017-08-16 14:35:14
      Completed with 'Error' : 2017-08-16 14:35:14
      Execution failed with error '1_SV1_Extract Error : '{"diagnosticCode":195887147,"severity":"Error","component":"RUNTIME","source":"User","errorId":"E_RUNTIME_USER_UNHANDLED_EXCEPTION_FROM_USER_CODE","message":"An unhandled exception from user code has been reported","description":"Unhandled exception from user code: \"The device is not ready.\r\n\"\nThe details includes more information including any inner exceptions and the stack trace where the exception was raised.","resolution":"Make sure the bug in the user code is fixed.","helpLink":"","details":"==== Caught exception System.IO.IOException\n\n   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)\r\n   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)\r\n   at System.IO.Compression.ZipFileExtensions.ExtractToDirectory(ZipArchive source, String destinationDirectoryName)\r\n   at System.IO.Compression.ZipFile.ExtractToDirectory(String sourceArchiveFileName, String destinationDirectoryName, Encoding entryNameEncoding)\r\n   at Microsoft.MetaAnalytics.LanguageWorker.UsqlPyExecution.LocatePython(String version) in C:\\Users\\shravan\\Source\\Repos\\VSTS\\USqlExtensions\\lang\\python\\AFx\\Product\\Source\\Modules\\LanguageWorker\\LanguageWorker.Dll\\UsqlExecution.cs:line 146\r\n   at Microsoft.MetaAnalytics.LanguageWorker.UsqlPyExecution.InvokeLanguage(String version, String scriptname, IList`1 infiles, IList`1 outfiles, IObserver`1 stringLogger) in C:\\Users\\shravan\\Source\\Repos\\VSTS\\USqlExtensions\\lang\\python\\AFx\\Product\\Source\\Modules\\LanguageWorker\\LanguageWorker.Dll\\UsqlExecution.cs:line 89\r\n   at Microsoft.MetaAnalytics.LanguageWorker.UsqlPyExecution.Run(IRowset input, IUpdatableRow output, String script, String version) in C:\\Users\\shravan\\Source\\Repos\\VSTS\\USqlExtensions\\lang\\python\\AFx\\Product\\Source\\Modules\\LanguageWorker\\LanguageWorker.Dll\\UsqlExecution.cs:line 42\r\n   at Extension.Python.Reducer.<Reduce>d__6.MoveNext() in C:\\Users\\shravan\\Source\\Repos\\VSTS\\USqlExtensions\\lang\\python\\ExtPy\\PyReducer.cs:line 56\r\n   at ScopeEngine.SqlIpReducer<Extract_0_Data0,Process_1_Data0,ScopeEngine::KeyComparePolicy<Extract_0_Data0,3> >.GetNextRow(SqlIpReducer<Extract_0_Data0\\,Process_1_Data0\\,ScopeEngine::KeyComparePolicy<Extract_0_Data0\\,3> >* , Process_1_Data0* output) in c:\\users\\e\\source\\repos\\usqlapplication1\\usqlapplication1\\bin\\debug\\1b720f51a8b3caea\\script_fe316531c87f021f\\sqlmanaged.h:line 2788\r\n   at std._Func_class<void>.()(_Func_class<void>* )\r\n   at RunAndHandleClrExceptions(function<void __cdecl(void)>* code)","internalDiagnostics":""}
      '
      '
      Execution failed !
      

      我知道博客文章提到在本地运行Python扩展并没有得到官方支持,但它们确实听起来像至少应该以某种方式可能吗?

      如果我在不使用本地Python扩展的情况下运行U-SQL脚本,我不会收到任何错误。

      我有什么遗失的吗?是否有任何记录我可以打开以了解更多?有没有人在本地使用U-SQL运行Python成功?

1 个答案:

答案 0 :(得分:4)

(Azure Data Lake团队在这里)

有关Python分发如何在Azure Data Lake Analytics服务中的最新更新。虽然这些改变改进了顶点启动时间,但它也打破了一些关于U-SQL脚本本地执行如何工作的基本假设。

团队正在开发一种替代解决方案,让本地执行的U-SQL脚本使用安装在同一本地计算机上的现有Python发行版。