[Python.NET] (no subject)

Aleks Berland <[email protected]>
Newsgroups gmane.comp.python.dotnet
Message-ID <CAH79Ot2yJLurRZ1_==58hHXKN+pO1YniWEQVaWWqKR4hBTSk=Q@mail.gmail.com>
Hi All,
I'm new to the list and to Python.NET

I am running the latest from Git, on Mono in Ubuntu 14.04.

I am working with NHibernate Database Configuration code,
I am experiencing problems trying to explicitly state generic
parameter (NHSearch)  so the C# strong type syntax make it possible infer
from NHSearch.Instance.

The offending line in pythonnet is:

db_adapter =
DatabaseAdapter.Configure.DatabaseConfiguration(conn_sql).SearchProvider[NHSearch](NHSearch.Instance)


And I get this back:


Unhandled Exception:
System.ArgumentException: GCHandle value cannot be zero
  at System.Runtime.InteropServices.GCHandle.op_Explicit (IntPtr value)
[0x00000] in <filename unknown>:0
  at Python.Runtime.ManagedType.GetManagedObject (IntPtr ob) [0x00000] in
<filename unknown>:0
  at Python.Runtime.Runtime.PythonArgsToTypeArray (IntPtr arg, Boolean
mangleObjects) [0x00000] in <filename unknown>:0
  at Python.Runtime.MethodBinding.tp_call (IntPtr ob, IntPtr args, IntPtr
kw) [0x00000] in <filename unknown>:0
  at (wrapper native-to-managed) Python.Runtime.MethodBinding:tp_call
(intptr,intptr,intptr)
  at (wrapper managed-to-native) Python.Runtime.Runtime:Py_Main
(int,string[])
  at Python.Runtime.PythonConsole.Main (System.String[] args) [0x00000] in
<filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: GCHandle value
cannot be zero
  at System.Runtime.InteropServices.GCHandle.op_Explicit (IntPtr value)
[0x00000] in <filename unknown>:0
  at Python.Runtime.ManagedType.GetManagedObject (IntPtr ob) [0x00000] in
<filename unknown>:0
  at Python.Runtime.Runtime.PythonArgsToTypeArray (IntPtr arg, Boolean
mangleObjects) [0x00000] in <filename unknown>:0
  at Python.Runtime.MethodBinding.tp_call (IntPtr ob, IntPtr args, IntPtr
kw) [0x00000] in <filename unknown>:0
  at (wrapper native-to-managed) Python.Runtime.MethodBinding:tp_call
(intptr,intptr,intptr)
  at (wrapper managed-to-native) Python.Runtime.Runtime:Py_Main
(int,string[])
  at Python.Runtime.PythonConsole.Main (System.String[] args) [0x00000] in
<filename unknown>:0



Not sure how/where to start to debug this. Any tips would be helpful!
I would be happy to give more details if needed of course, but I am not
sure what will help at this stage, so let me know.

Regards,

- Aleks

_________________________________________________
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.