What's new

Wizotools sqlite3

otrotabi

Member
I´ve noticed there seems to be support for sqlite in wizotools, directory Program Files/Wizotools/PythonLib/sqlite3 exists.

My question is : is it supposed to work ? Or does Wizotools use this directory for it´s own functioning ?

If I run:

>>>import sqlite3

I get the following error:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\WizoScript\PythonLib\sqlite3\__init__.py", line 29, in <module>
File "C:\Program Files\WizoScript\PythonLib\sqlite3\__init__.py", line 28, in _
IOError: System.IO.FileLoadException: No se puede cargar el archivo o ensamblado 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' ni una de sus dependencias. La definición del manifiesto del ensamblado no coincide con la referencia al ensamblado. (Excepción de HRESULT: 0x80131040)
Nombre de archivo: 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1'
en System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
en System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
en System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
en System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
en System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
en System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
en System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
en Microsoft.Scripting.Utils.ReflectionUtils.GetCustomAttributes[T](Assembly assembly, Boolean inherit)
en IronPython.Runtime.Binding.PythonBinder.DomainManager_AssemblyLoaded(Object sender, AssemblyLoadedEventArgs e)
en System.EventHandler`1.Invoke(Object sender, TEventArgs e)
en Microsoft.Scripting.Runtime.ScriptDomainManager.LoadAssembly(Assembly assembly)
en IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references)
en Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
en System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
en Microsoft.Scripting.Interpreter.FuncCallInstruction`6.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
en IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
en System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
en IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
en IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
en IronPython.Runtime.PythonContext.InitializeModule(String fileName, ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
en IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context, String name, String path)
en IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, String name, String fullName, String str)
en IronPython.Runtime.Importer.ImportFromPathHook(CodeContext context, String name, String fullName, List path, Func`5 defaultLoader)
en IronPython.Runtime.Importer.ImportFromPath(CodeContext context, String name, String fullName, List path)
en IronPython.Runtime.Importer.ImportTopAbsolute(CodeContext context, String name)
en IronPython.Runtime.Importer.ImportModule(CodeContext context, Object globals, String modName, Boolean bottom, Int32 level)
en IronPython.Modules.Builtin.__import__(CodeContext context, String name, Object globals, Object locals, Object fromlist, Int32 level)
en Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.LightLambda.Run7[T0,T1,T2,T3,T4,T5,T6,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
en IronPython.Runtime.Importer.ImportLightThrow(CodeContext context, String fullName, PythonTuple from, Int32 level)
en Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
en Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
en IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
en Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
en #0pb.#xjb.#mjb(Object #o, #Gjb #p)

AVS: El registro del enlace de ensamblado está desactivado.
Para habilitar el registro de errores del enlace de ensamblado, establezca el valor de Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Nota: existe una disminución del rendimiento asociada registro de errores del enlace de ensamblado.
Para desactivar esta característica, elimine el valor de Registro [HKLM\Software\Microsoft\Fusion!EnableLog].
 

ajayre

Alibre Super User
It's part of the standard library so it should work. I will look into it.

I am curious to know - what kind of use for AD and SQLite do you have in mind?

Andy
 

otrotabi

Member
SQLite3 is mainly for offline local databases.

There are some PostgreSQL python modules listed here:

https://wiki.postgresql.org/wiki/Python

You will need to choose one that is "pure python" and works with Python 2.x.

Andy

Thanks.

I am not familiar with IronPython and the dll´s. From Python shell I would use pip install to add new libraries but I guess it works different here because pip gives me a traceback if run from the console.

If you have any hints on how to add new libraries to IronPython I would appreciate it.

Regards. José.
 
Top