Hi, is it possible to import sqlite3 library into deadline (3.1sp1)? I want to write scripts to communicate with our database, but when I import, always get this: “no module named _sqlite3”. I tried to give the path in every possible form (env var. path, sys.path.append in script, repository options, installed python path on repository), and still nothing. Anyone did this? Maybe because ironpython, it’s not possible to do this?
Many thanks!
Gabor
Hi Gabor,
Found this blog, which might be helpful:
markgarringer.codingtomusic.com/?p=38
Cheers,
- Ryan
Hi, thanks for the reply!
Unfortunately I’m not sure exactly how to use it. I got a UI, but don’t know how to make it really work. Does anyone have any clue? Anyway, what I would like to achieve is somehow import and use the standard python sqlite commands, so that I can use the functions I’ve written for nuke/maya. But it looks like it is not possible with ironpython…?
Thanks
Gabor
Hi Gabor,
IronPython doesn’t always play nicely with native python libraries. Would it be possible to post some sample code that you would expect to work that isn’t? We could try running a few tests here to see if we can come up with a solution.
Cheers,
- Ryan
Hi,
I also would like to use our sqlite database and our inhouse scripts (python 2.7) with your quicktime dailies script (or its slightly modified version). However I could not use even the imports in deadline from the previous link you proivided.
import System
from System.Data import *
from System.Data.SQLite import *
[code]
Events plugin ‘QuicktimeGen’ could not be loaded from the repository because: Error executing event plugin script “W:\DeadlineRepository\events\QuicktimeGen\QuicktimeGen.py”: Python Error: No module named Data (IronPython.Runtime.Exceptions.ImportException)
(Deadline.Events.DeadlineEventPluginException)[/code]
I have found -as far as I can tell - an “interpreter-like thing” between IronPython and the standard python sqlite3 library.
https://bitbucket.org/jdhardy/ironpython.sqlite/wiki/Home
It says, it is a:
I could not find any place to copy its files in Deadline, because there are no such directories in the repository (why would there be). However the good thing is that it works with a standard Ironpython installation.
Could you please tell me, whether it is possible to hack this IronPython.SQLIte into Deadline or alternatively a way to reach an sqlite db?
thank you very much in advance
G
I imagine you could drop the IronPython sqlite dll (assuming there is one) into the local Deadline bin folder, since we add that to the IronPython search path. Test it on one machine, and if that works, you can then drop it in the repository bin folder and modify the Version file in the same folder. If you have automatic updates enabled, Deadline can automatically push this new dll to all the client machines as if it was doing a normal minor upgrade:
thinkboxsoftware.com/deadlin … he_Clients
When editing the Version file in the repository bin folder, just add some gibberish to it, as we just perform an MD5 checksum on it to see if it matches the Version file in the local bin folder.
Deadline 5.1, which just went into public beta 2 weeks ago, will also be shipping with Native Python support. That will make it possible to import standard python libraries like these.
Cheers,
- Ryan
Thank you Ryan, I`ll give it a shot…