- Notifications
You must be signed in to change notification settings - Fork750
Closed
Milestone
Description
Environment
- Pythonnet version: 3.0.0
- Python version: 3.9.5
- Operating System: windows 10
- .NET Runtime: .NET 6
Details
Describe what you were trying to get done.
foreach a tuple at runtime via "dynamic" keyword
What commands did you run to trigger this issue? If you can provide a
[Minimal, Complete, and Verifiable example] (http://stackoverflow.com/help/mcve)
this will help us understand the issue.
`
dynamic sys = Py.Import("sys");
dynamic path2 = sys.path;foreach (PyObject item in path2)
{
Console.WriteLine(item);
}
`If there was a crash, please include the traceback here.
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: "Cannot implicitly convert type 'Python.Runtime.PyObject' to 'System.Collections.IEnumerable'. An explicit conversion exists (are you missing a cast?)"
Metadata
Metadata
Assignees
Labels
No labels