filmor on master
disallow runtime shutdown when … (compare)
filmor on fix-enum-codec
filmor on master
Fix enum codec A boxed enum va… Add unit test for enum encoder Allow conversion of UInt64 base… and 1 more (compare)
filmor on fix-enum-codec
Add unit test for enum encoder Allow conversion of UInt64 base… (compare)
import clr
import sys
assembly_path = r"C:\Users\xxx\dlls"
sys.path.append(assembly_path)
clr.AddReference("Azure.Core")
clr.AddReference("Azure.Storage.Blobs")
clr.AddReference("Azure.Storage.Common")
clr.AddReference("Azure.Storage.Files.DataLake")
from Azure.Storage import StorageSharedKeyCredential
from Azure.Storage.Files.DataLake import DataLakeFileSystemClient
from Azure.Storage.Files.DataLake import DataLakeServiceClient
public bool GetPictureData(string strChannel, int objectID, out int width, out int height, out int[] imagePixels). In Python I try to use it like this: my_obj.GetPictureData('c01', 0, Int32(0), Int32(0), Array[int](0)) but I get TypeError: Cannot convert 0 to System.Int32[]. What am I doing wrong?
I get a "invalid syntax" error when I try to set a checkbox on a WinForms checkbox from Python. Here is the line I'm executing:
Host.LogToResultsCheckBox.Checked = True
The same line works fine from C#.
Does anyone know how to access a form property like that? I can read the property's state just fine from Python. I just can't write to it.
PythonEngine.PythonPath the application crashes on MacOS (no exception caugh despite try...catch block). I use Avalonia 10.12 and .NET 5. I assign this value @"/Users/kasperczyks/Desktop/PyCommon", I have folder on my desktop on macOS (Catalina 10.15.7) from where I want to import stuff. It works on windows, but I cannot make it run on MacOS. So should I use PythonEngine.PythonPathor rather Environment.SetEnvironmentVariable? I tried the second option multiple times but notnigh seems to work for my case
1 args, Boolean setSysArgv, Boolean initSigs)
at Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs)
at Python.Runtime.PythonEngine.Initialize()
at Numpy.np.InstallAndImport(Boolean force)
at Numpy.np.<>c.<.cctor>b__614_0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode)1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue()When I am using
var data = Numpy.np.array(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 });
Console.WriteLine(data);
Hi, I am getting this error. Please could anyone offer some advice? it would be much appreciated,
I use Python 3.9.5 and VS Code 2021.
Main errors seems to be:
C:\Users\A.nuget\packages\microsoft.build.tasks.git\1.0.0\build\Microsoft.Build.Tasks.Git.targets(24,5): error : Error reading git repository information: Unsupported repository version 1. Only versions up to 0 are supported. [C:\Users\A\AppData\Local\Temp\pip-req-build-f0p8hkr5\src\runtime\Python.Runtime.csproj]
mock_instance = MagicMock(spec=NetClass) based on mock doc but isinstance(mock_instance, NetClass) returns False.Hi all, Facing an issue after migrated from 2.5.2 to 3.x pre release versions . Basically the python int type is getting translated to PyInt inside my .net DLL and getting and error -- this is happening when I pass my python int as a value in a .net dictionary. this was working earlier in 2.5.2 version where the int was getting converted to System.int32
System.InvalidCastException: Unable to cast object of type 'Python.Runtime.PyInt' to type 'System.IConvertible'.
at System.Convert.ToInt32(Object value)
at ImageOCR.TemplateElement..ctor(Dictionary`2 paramDict)
Any one faced similar issue ?
hello how can i new an C# Class in the py code ? like
/// <summary>UserItem</summary>
public class UserItem
{
/// <summary>Name</summary>
public string Name { get; set; }
/// <summary>Age</summary>
public int Age { get; set; }
}i want use it in Python Code like
using (var scope = Python.Runtime.Py.CreateScope())
{
//how import the class ?
var code = "from ???.types import UserItem";
var code = "userItem = UserItem()";
scope.Exec(code);
}thanks ... pls give me the think...idea...