I built a local sqlite db with data from 2009-01-02, using my then
installed 3.6 version on Debian/testing (currently using 3.8).

I've noticed that there are a few things that are different between
the http and sql versions.  Some I think (ratings missing from http,
year as string vs int) will be fixed when I update.  But, I think the
following may be more fundamental.

Consider this script:
#!/usr/bin/python

import imdb

i1 = imdb.IMDb()
i2 = imdb.IMDb('sql', 'sqlite:/share/media/imdb/sql.db')

title = 'Drunken Master'
year = '1978'

s1 = i1.search_movie(title)
s2 = i2.search_movie(title)

for m in s1:
  if m['year'] == year:
    print 's1:', m['title'], m['year']
    i1.update(m)
    print m['akas']

for m in s2:
  if m['year'] == int(year):
    print 's2:', m['title'], m['year']
    i2.update(m)
    print m['akas']


Using http, the title is Jui kuen and akas look like
u'Challenge::(India: English title)'
When using sql, the title is Drunken Master and akas look like
u'Challenge (1978)::(India: English title)'

This makes it very difficult to write code that works with both
systems.  [I just tested against svn head, and once I fixed the string
vs int problem, I still get the above output.]

Is this a bug due to me loading the data with 3.6 and if I reloaded
with a current version, I'd get more consistent output?

Is it a bug in sqlite, and if I used a different DB I'd see different results?

It took me over 24 hours to load the data into sqlite on my machine,
most of it indexing.  So, I'd rather not reload it if I can help it
(and I did use --sqlite-transactions).   In doing some research, I see
that building indexes is known to be slow with sqlite, maybe a feature
request could be to have an option to choose minimal or no indexes
with sqlite.  For what _I_ plan on doing, I won't need most of the
indexes and could probably do without most of them.

Then again, I may just brush the dust off of my postgres server and
actually set up something there.

Thanks,
mrc

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to