Title: Exception with mysterious description while trying to initialize yt_dlp from C# · Issue #2674 · pythonnet/pythonnet · GitHub
Open Graph Title: Exception with mysterious description while trying to initialize yt_dlp from C# · Issue #2674 · pythonnet/pythonnet
X Title: Exception with mysterious description while trying to initialize yt_dlp from C# · Issue #2674 · pythonnet/pythonnet
Description: I have a C# project from which I'm trying to experiment with calling yt-dlp. On the follow statement, I get an exception for which the message is that the exception was thrown. The exception's InnerException is null. What could be going ...
Open Graph Description: I have a C# project from which I'm trying to experiment with calling yt-dlp. On the follow statement, I get an exception for which the message is that the exception was thrown. The exception's Inne...
X Description: I have a C# project from which I'm trying to experiment with calling yt-dlp. On the follow statement, I get an exception for which the message is that the exception was thrown. The exception...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/2674
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception with mysterious description while trying to initialize yt_dlp from C#","articleBody":"I have a C# project from which I'm trying to experiment with calling yt-dlp. On the follow statement, I get an exception for which the message is that the exception was thrown. The exception's `InnerException` is `null`. What could be going on?\n\n```\nException of type 'System.ExecutionEngineException' was thrown.\n```\n\n\u003cimg width=\"1645\" height=\"893\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ebbe739a-e7cf-4a61-949f-b08735472687\" /\u003e\n\nI tried to step into the code, but quickly ran into unmanaged code before finding where the exception was thrown.\n\n```\nFatal error. 0xC0000005\n at Python.Runtime.Runtime.PyImport_ImportModule(System.String)\n at Python.Runtime.PyModule.Import(System.String)\n at Python.Runtime.Py.Import(System.String)\n at YtDlpTest.TestYtDlp..ctor()\n at DynamicClass.lambda_method172(System.Runtime.CompilerServices.Closure)\n at System.Management.Automation.CommandProcessor.Init(System.Management.Automation.CmdletInfo)\n at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(System.Management.Automation.CommandInfo, System.Management.Automation.CommandOrigin, System.Nullable`1\u003cBoolean\u003e, System.Management.Automation.SessionStateInternal)\n at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(System.String, System.Management.Automation.CommandOrigin, System.Nullable`1\u003cBoolean\u003e)\n at System.Management.Automation.ExecutionContext.CreateCommand(System.String, Boolean)\n at System.Management.Automation.PipelineOps.AddCommand(System.Management.Automation.Internal.PipelineProcessor, System.Management.Automation.CommandParameterInternal[], System.Management.Automation.Language.CommandBaseAst, System.Management.Automation.CommandRedirection[], System.Management.Automation.ExecutionContext)\n at System.Management.Automation.PipelineOps.InvokePipeline(System.Object, Boolean, System.Management.Automation.CommandParameterInternal[][], System.Management.Automation.Language.CommandBaseAst[], System.Management.Automation.CommandRedirection[][], System.Management.Automation.Language.FunctionContext)\n at System.Management.Automation.Interpreter.ActionCallInstruction`6[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Run(System.Management.Automation.Interpreter.InterpretedFrame)\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)\n at System.Management.Automation.Interpreter.Interpreter.Run(System.Management.Automation.Interpreter.InterpretedFrame)\n at System.Management.Automation.Interpreter.LightLambda.RunVoid1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)\n at System.Management.Automation.DlrScriptCommandProcessor.RunClause(System.Action`1\u003cSystem.Management.Automation.Language.FunctionContext\u003e, System.Object, System.Object)\n at System.Management.Automation.DlrScriptCommandProcessor.Complete()\n at System.Management.Automation.CommandProcessorBase.DoComplete()\n at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(System.Management.Automation.CommandProcessorBase)\n at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)\n at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()\n at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()\n at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()\n at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)\n```","author":{"url":"https://github.com/WillPittenger","@type":"Person","name":"WillPittenger"},"datePublished":"2025-12-28T00:10:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2674/pythonnet/issues/2674"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:24f9a7a2-6ae9-9124-3439-ceeb026d5a67 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9214:2B1C04:2598FE8:31F6F3A:6971C1BA |
| html-safe-nonce | 6a4e673b65808d01c844e3f70922d84ae22611da2bcc1f69a7028b718547c4da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjE0OjJCMUMwNDoyNTk4RkU4OjMxRjZGM0E6Njk3MUMxQkEiLCJ2aXNpdG9yX2lkIjoiODY0NzQyMTI0MzcwOTAzNDgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | afee7a987102a6547b173d99c8b65441c9599d6d922df31417ca39eaa2855d0d |
| hovercard-subject-tag | issue:3765186690 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/2674/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0d4b1830329b04e6b92d3c98c3d9464c19d4fc4ac2b3d9aba0ca9d01485d0d4a/pythonnet/pythonnet/issues/2674 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0d4b1830329b04e6b92d3c98c3d9464c19d4fc4ac2b3d9aba0ca9d01485d0d4a/pythonnet/pythonnet/issues/2674 |
| og:image:alt | I have a C# project from which I'm trying to experiment with calling yt-dlp. On the follow statement, I get an exception for which the message is that the exception was thrown. The exception's Inne... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | WillPittenger |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3b677fea7de290a6c0d1c9ccd6c9909b6a527cf8ee079649e09dc78092d24f1 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 29d7fcca69cafb91ec8a596aaf222fd46e9bc934 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width