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
(Continue reading)

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 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 | 24 Nov 08:42
Picon
Gravatar

Re: Error returned when running imdbpy2sql.py with MySQL database

On Thu, Nov 24, 2011 at 02:33, Cody Bohn <codybohnhead@...> wrote:
>
> I installed IMDbPY by way of the package (apt-get install python-imdbpy)

Version of the package?

> This is the error that I am recieving:

Looks like the package is missing some dependencies.
Try installing python-decorator python-dev python-migrate
python-formencode python-sqlalchemy python-sqlobject

--

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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Davide Alberani | 19 Nov 21:29
Picon
Gravatar

Re: Error returned when running imdbpy2sql.py with MySQL database

On Sat, Nov 19, 2011 at 20:17, Cody Bohn <codybohnhead@...> wrote:
>
> I am getting this issue when I run imdbpy2sql.py with the proper arguments
> with a mysql scheme and I can't seem to figure out the issue. I posted on
> Stack Overflow but I only managed to resolve part of the problem and this is
> what remains.

Hi!
Looks like you've some serious problem with dependencies.

Can you tell us how and where you're installing IMDbPY, and what's
your environment?
It whould help to know:
1. your distribution,
2. if you're installing IMDbPY from the tar.gz, or if you're using a
    package or you're installing it using easy_install or pip.
3. are you installing it in a virtualenv?

Also, check to not have other versions of IMDbPY installed
on your system.

If you're using easy_install, please be sure to have only one
executable installed in your path.

Thanks for the report!

--

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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Cody Bohn | 19 Nov 20:17
Picon
Gravatar

Error returned when running imdbpy2sql.py with MySQL database

I am getting this issue when I run imdbpy2sql.py with the proper arguments with a mysql scheme and I can't seem to figure out the issue. I posted on Stack Overflow but I only managed to resolve part of the problem and this is what remains.

The following is the output:

Traceback (most recent call last):
  File "/usr/local/bin/imdbpy2sql.py", line 4, in <module>
    import pkg_resources
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2672, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: decorator

Does anyone happen to know what is happening and/or have a solution to the issue?

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@...
https://lists.sourceforge.net/lists/listinfo/imdbpy-help
Davide Alberani | 17 Nov 20:16
Picon
Gravatar

Re: imdbpy2sql: KeyError: md5sum

On Wed, Nov 16, 2011 at 09:38, Frederik Vaassen
<frederik.vaassen@...> wrote:
>
> Brand new. I even had to install mysql (as well as SQLObject and
> mysql-python) since I'd never used it before :) I tried dropping and
> re-creating the database, but that doesn't seem to have helped.

I'm really puzzled... :-)
I'm unable to reproduce it.

Is it possible that you have a package of python-imdbpy installed
by your distribution?  (if it's so, try removing it and using the version
from the repository).

Maybe you can look at how the table was created.
>From the command line:
  mysql -u USERNAME -p imdb

and then:
  DESC aka_title;

You should see a 'md5sum' field...

--

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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Nicholas Cafarchio | 17 Nov 07:10
Favicon

Retrieving actor info set from Person

Let me first preface this question by stating that I really don't know a whole lot of Python: in fact, all I
know of the language I learned from playing around with IMDbPY. Therefore, you'll have to dumb your
responses down a bit *sheepish smile*

Ok, into the meat of the question:

I'm attempting to create a script that lets you find the "connections" between two actors (i.e. through
movies and actors they have worked with, how are they connected, 6 Degrees of Kevin Bacon?). Retrieving
the information is easy enough, but the logic that looks for the connections is slightly more complicated
than I can handle in Python, so, being a Java programmer, I decided to use Jython. Here's where I run in to
some issues, and I'm fairly confused to say the least.

1. I can correctly import the imdb package into my program (I'm using the Python Interpreter method of
Jython if you're at all familiar with it. It goes something like this, fairly simple to understand.)

PythonInterpreter pi = new PythonInterpreter();
pi.exec("import imdb");
pi.exec("i = imdb.IMDb(accessSystem=\'mobile\')");

Basically, you just feed the Python commands to the PythonInterpreter object as strings.

2. I'm using the mobile access system. Part of this is for speed, part of it is lxml issues, more on this in a bit.
3. Using search_person, I can successfully retrieve a Person (i.e. pi.exec("bacon =
i.search_person(\"Kevin Bacon\")[0]");
4. calling .keys() on this Person gives you what you would expect by default

Here's where things get interesting:

5a. When I call i.update(bacon) in the interactive python shell, the 'actor' info set is now listed as an
info set of bacon
5b. When I call pi.exec("i.update(bacon)"); inside my Jython script, about 1/4 of the info sets that
should be returned do not show up when you call .keys(), 'actor' being one of them.
6b. Using http instead of mobile in my Jython script gets me some of the info sets, but still not 'actor'. 
7b. Even though I import sys and append the path to lxml to path, the script always falls back to
beautifulsoup, and it takes forever. This doesn't happen in the interactive shell.

So, now that the background is out of the way, does anyone know why I'm getting different results in the shell
and the script? Better yet, does anyone know how to fix it? If someone can help me fix the lxml thing, that
would be helpful, but it's not a primary concern.

Thanks in advance,

Nick Cafarchio 
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Frederik Vaassen | 15 Nov 16:33
Picon

imdbpy2sql: KeyError: md5sum

Hi,

I'm attempting to transform the IMDb text files (acquired from one of
the mirrors today) into a mySQL database using imdbpy2sql (the latest
version from Mercurial). Something goes wrong, though, and my knowledge
of Python/MySQL isn't sufficient to find out what the cause of the error
is. Any pointers? Here's the error message, which I get right after
trying to execute the Python script.

---
NOTICE: IF you're using InnoDB tables, data insertion can
be very slow; you can switch to MyISAM tables - forcing it
with the --mysql-force-myisam option - OR use the
--mysql-innodb command line option, but DON'T USE these if
you're already working on MyISAM tables, because it will
force MySQL to use InnoDB, and performances will be poor.

Traceback (most recent call last):
  File "imdbpy2sql.py", line 1675, in <module>
    CACHE_MID_AKAS = AkasMoviesCache()
  File "imdbpy2sql.py", line 1636, in __init__
    MoviesCache.__init__(self, *args, **kdws)
  File "imdbpy2sql.py", line 990, in __init__
    'md5sum'))
  File "imdbpy2sql.py", line 598, in createSQLstr
    colNames.append(colName(table, col))
  File "imdbpy2sql.py", line 543, in colName
    return table.sqlmeta.columns[column].dbName
KeyError: 'md5sum'
---

Any help would be greatly appreciated!

Frederik

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
Zsolt Ero | 12 Nov 20:44
Picon

getting "grossing" data

Hi,

I have just started using IMDbPY. I would like to get the "grossing"
field of a given movie, but I don't know how.

Neither "business" or "grossing" works for me.

Is grossing available in IMDbPY in some way?

Zsolt

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
Davide Alberani | 29 Oct 16:33
Picon
Gravatar

Re: cant retrieve movie list from person

On Sat, Oct 29, 2011 at 16:12, Gustaf Nilsson <gustaf@...> wrote:
>
> Thanks, yeah i was gonna make a little script that figured out the average
> rating of everybody in the office and see who wins ;)

Ahaha, great idea. :D

> Still cant get it to work tho. I updated to the latest version and then did
> this:

Sigh... this seems to be related to the beautifulsoup parser. :(
It's a serious bug, since IMDbPY is supposed to work fine
even in a pure python environment, but I fear I don't have
time to fix it.

Try installing python-lxml, and you should be using the
lxml parsers, instead of beautifulsoup.

Let me know if it works.

--

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

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps 
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev

Gmane