darklow | 13 Dec 09:26
Picon
Gravatar

imdbpy2sql - some movies are missing nr_order for the cast

Hi,


Just noticed that some movies are missing nr_order for the cast.
 
For example: Titles: Snow White and the Huntsman (2012) and Ceremony (2010)

select * from cast_info where movie_id=(select id from title where title='Snow White and the Huntsman');
NR_ORDER column is <NULL> for every cast_info entry beside one, which has value 19 
http://www.imdb.com/title/tt1735898/

select * from cast_info where movie_id=(select id from title where title='Ceremony' and kind_id=1 and production_year=2010);
NR_ORDER column is <NULL> for every cast_info entry beside one, which has value 0
http://www.imdb.com/title/tt1341341/

It looks like there is something wrong, becaouse i have never seen so much nr_order missing before


I am using latest dev version of imdbpy2sql (IMDbPY==4.9dev-20111124) (PostgreSQL)
Data files date: 24.Nov.2011

I just ran update with newest datafiles (09.Dec.2011) 
I'll notice as soon as it ends if there will be any changes.

Maybe you already have some ideas what could went wrong?
Thanks.
------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@...
https://lists.sourceforge.net/lists/listinfo/imdbpy-help
Davide Alberani | 13 Dec 10:42
Picon
Gravatar

Re: imdbpy2sql - some movies are missing nr_order for the cast

On Tue, Dec 13, 2011 at 09:26, darklow <darklow@...> wrote:
>
> It looks like there is something wrong, becaouse i have never seen so much
> nr_order missing before

I've downloaded the latest set of files; I'll look at it as soon as possible.

As usual, thanks for the report!

--

-- 
Davide Alberani <davide.alberani@...>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
darklow | 13 Dec 19:01
Picon
Gravatar

Re: imdbpy2sql - some movies are missing nr_order for the cast

I can confirm that the problem with missing nr_order appears also in latest data files (9.dec.2011)

Hope there is some solution and it is not permanent.
Thanks a lot

On Tue, Dec 13, 2011 at 11:42 AM, Davide Alberani <davide.alberani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Tue, Dec 13, 2011 at 09:26, darklow <darklow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> It looks like there is something wrong, becaouse i have never seen so much
> nr_order missing before

I've downloaded the latest set of files; I'll look at it as soon as possible.

As usual, thanks for the report!

--
Davide Alberani <davide.alberani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@...
https://lists.sourceforge.net/lists/listinfo/imdbpy-help
Davide Alberani | 13 Dec 19:58
Picon
Gravatar

Re: imdbpy2sql - some movies are missing nr_order for the cast

On Tue, Dec 13, 2011 at 19:01, darklow <darklow@...> wrote:
>
> I can confirm that the problem with missing nr_order appears also in latest
> data files (9.dec.2011)
> Hope there is some solution and it is not permanent.

At a very first look, it seems to me that these information, for these movies,
are completely missing from the data files (most probably because they are
unknown: IMDb puts the credits order only if they were officially taken from the
movie credits)

It can be tested with a regexp like this:
   zcat actors.list.gz actresses.list.gz | grep -P '\011Ceremony\
\(2010\).*<.*>'

Which, on my set of files, returns nothing (meaning that there are no
actors or actresses with credits order for that movie).

However, this doesn't explain your 19 and 0... :-/
My db is not up-to-date: I'll recreate it tomorrow and see the result
of your queries.

Bye!

--

-- 
Davide Alberani <davide.alberani@...>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Picon

Adding foreign keys fail with postgresql database

Hi,

  At the end of imdbpy2sql.py script, i get this error:

# TIME TOTAL TIME TO INSERT/WRITE DATA : 253min, 55sec (wall) 93min, 
7sec (user) 15min, 0sec (system)
building database indexes (this may take a while)
# TIME createIndexes() : 26min, 33sec (wall) 0min, 0sec (user) 0min, 
0sec (system)
adding foreign keys (this may take a while)
Traceback (most recent call last):
   File "/usr/bin/imdbpy2sql.py", line 5, in <module>
     pkg_resources.run_script('IMDbPY==4.8.2', 'imdbpy2sql.py')
   File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 500, 
in run_script
     self.require(requires)[0].run_script(script_name, ns)
   File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 
1236, in run_script
     execfile(script_filename, namespace, namespace)
   File

"/usr/lib64/python2.6/site-packages/IMDbPY-4.8.2-py2.6-linux-x86_64.egg/EGG-INFO/scripts/imdbpy2sql.py", 
line 2958, in <module>
     run()
   File

"/usr/lib64/python2.6/site-packages/IMDbPY-4.8.2-py2.6-linux-x86_64.egg/EGG-INFO/scripts/imdbpy2sql.py", 
line 2910, in run
     buildIndexesAndFK()
   File

"/usr/lib64/python2.6/site-packages/IMDbPY-4.8.2-py2.6-linux-x86_64.egg/EGG-INFO/scripts/imdbpy2sql.py", 
line 2722, in buildIndexesAndFK
     createForeignKeys(DB_TABLES)
   File

"/usr/lib64/python2.6/site-packages/IMDbPY-4.8.2-py2.6-linux-x86_64.egg/imdb/parser/sql/dbschema.py", 
line 460, in createForeignKeys
     table.addForeignKeys(mapTables, ifNotExists)
   File

"/usr/lib64/python2.6/site-packages/IMDbPY-4.8.2-py2.6-linux-x86_64.egg/imdb/parser/sql/objectadapter.py", 
line 133, in addForeignKeys
     newcls._connection.query(fkQuery)
   File "/usr/lib64/python2.6/site-packages/sqlobject/dbconnection.py", 
line 414, in query
     return self._runWithConnection(self._query, s)
   File "/usr/lib64/python2.6/site-packages/sqlobject/dbconnection.py", 
line 327, in _runWithConnection
     val = meth(conn, *args)
   File "/usr/lib64/python2.6/site-packages/sqlobject/dbconnection.py", 
line 411, in _query
     self._executeRetry(conn, conn.cursor(), s)
   File "/usr/lib64/python2.6/site-packages/sqlobject/dbconnection.py", 
line 406, in _executeRetry
     return cursor.execute(query)
psycopg2.IntegrityError: insert or update on table "movie_info" violates 
foreign key constraint "movie_id_exists"
DETAIL:  Key (movie_id)=(2077921) is not present in table "title".

When i look in movie_info table for id 2077921, i have this:
id;    movie_id;    info_type;    info;    note
"2077921";1559911;96;"Hallo - Sie haben Ihre Frau vergessen. In: 
Illustrierte Film-Bühne, Film-Bühne G.m.b.H., No. 310, 1949, Pgs. 4";""

In table title, i have no line with id=2077921 but i have a line with id 
=1559911 (the number from movie_info's movie_id. The line seems to match :)
"1559911";"Hallo - Sie haben Ihre Frau 
vergessen";"";1;1949;;"H4215";;;;"";"8500761c703695245a02335ec6e4e139"

The data files were downloaded on december 13th and i use imdbpy 4.8.2.
If you need any more informations, i can provide them

------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits? 
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
Davide Alberani | 14 Dec 20:58
Picon
Gravatar

Re: Adding foreign keys fail with postgresql database

On Wed, Dec 14, 2011 at 17:20, y.josuin@...
<y.josuin@...> wrote:
> Hi,
>
>  At the end of imdbpy2sql.py script, i get this error:

Hi!

Thank you very much for the detailed report.
Unfortunately I'm very busy at the moment; I hope to have a look at the
problem within a week or so.

Thanks!
--

-- 
Davide Alberani <davide.alberani@...>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits? 
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
Davide Alberani | 26 Dec 14:44
Picon
Gravatar

Re: Adding foreign keys fail with postgresql database

On Wed, Dec 14, 2011 at 20:58, Davide Alberani
<davide.alberani@...> wrote:
>
> Thank you very much for the detailed report.

I think to have fixed it in the Mercurial repository: the problem was created
by the fact that right now, the "crazy credits" doesn't contain any reference
to movie titles. :-/
I hope they will fix this soon.

Thank you very much for your report - I'll add your name to the credits.

--

-- 
Davide Alberani <davide.alberani@...>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
Davide Alberani | 26 Dec 14:55
Picon
Gravatar

Re: imdbpy2sql - some movies are missing nr_order for the cast

On Tue, Dec 13, 2011 at 19:58, Davide Alberani
<davide.alberani@...> wrote:
>
> However, this doesn't explain your 19 and 0... :-/
> My db is not up-to-date: I'll recreate it tomorrow and see the result
> of your queries.

Pardon for the delay.
I have the same data, and they are from the 'writer.list' file.  Most probably,
they are wrong submissions or have some arcane meaning for the IMDb
database. :-)

Happy holidays!

--

-- 
Davide Alberani <davide.alberani@...>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev

Gmane