Page MenuHome

Sqlite 3 ImportError
Closed, ResolvedPublic

Description

System Information
Operating system and graphics card
Windows 10
Blender Version
Broken: 2.75a from 2015-07-07

With some files the DLL load failed error appears.
Short description of error

Exact steps for others to reproduce the error
Start the bug_test.blend and read the console text.

Details

Type
Bug

Event Timeline

laurenz steiner (laurenz) set Type to Bug.
laurenz steiner (laurenz) created this task.
laurenz steiner (laurenz) raised the priority of this task from to Needs Triage by Developer.

First of all, please check against latest release (2.76). ;)

Also, please attach here the log text of the error in the console.

Bastien Montagne (mont29) triaged this task as Needs Information from User priority.Oct 18 2015, 12:19 PM

Hi, sry I didnt even notice the new release, but, i just tried it and it didnt work either.
and here is the console log:

Find those .../2.76/2.76/... very suspicious… Does importing any other py module (os, sys, etc.) works?

@Martijn Berger (juicyfruit) I think that kind of path is not expected for embedded python?

Yeah, I dont have any problems with os or bge or pickle...just sqlite3 doesnt work always, but in a repeateable way. I have some files where it works without a problem, and then there are others where it doesnt work at all. like the one in the bug zip.


Here is the system-info.txt
and no, blender is installed on D: in the matching release-directory

I now found out that the problem doesn't appear when I open the blend file with the open command instead of the shortcut or the file. Also the os command chdir(Blenderdirectory) solves the problem, but i still think that this is a bug, which should be fixed ;)

Does it still happen with 2.76? And does this happen with other modules (os, sys, etc)?

Yes it still happens with 2.76 and no, at least I didnt notice any problems with other modules.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Normal.Nov 13 2015, 4:00 PM

Either sqlite3.dll should either become static (_sqlite could stay dynamic, python knows how to deal with it) or we have add path with sqlite3 to the PATH variable from blender-app.exe.

@Martijn Berger (juicyfruit), mind investigating if it's doable to make sqlite3.dll static now?

This started happening on my computer, my script using sqlite3 would not work, and typing 'import sqlite3' in the python console would not work.
This was happening in any .blend file (even when I loaded the factory defaults), running blender from various locations, and in several different versions of blender.

If anyone else comes across this in a search before it is fixed, I managed to get it to import properly by adding the folder that contains the sqlite3.dll file (the blender main directory) to the windows 'Path' variable.

Fixed in 2.77 and buildbots as of tomorrow