wagnerrp / pytmdb3

Python interface to TheMovieDB.org v3 API
BSD 3-Clause "New" or "Revised" License
122 stars 36 forks source link

Crew forgets job after access #15

Closed kasrak closed 12 years ago

kasrak commented 12 years ago
>>> import tmdb3
>>> tmdb3.set_key(settings.TMDB_DEVELOPER_KEY)
>>> tmdb3.set_cache('null')
>>> m = tmdb3.Movie(3131)
>>> m
<Movie 'Gangs of New York' (2002)>
>>> m.crew
[<Crew 'Martin Scorsese','Director'>, <Crew 'Jay Cocks','Screenplay'>, ...
>>> c = m.crew[0]
>>> c
<Crew 'Martin Scorsese','Director'>
>>> c.job
u''
>>> c
<Crew 'Martin Scorsese',''>
>>> m.crew
[<Crew 'Martin Scorsese',''>, <Crew 'Jay Cocks','Screenplay'>, ...

Notice that c.job returns an empty string and afterwards, that Crew object's job permanently becomes an empty string.

This is based on 0.6.2.

wagnerrp commented 12 years ago

Seems to work fine here. What version of Python are you running?

kasrak commented 12 years ago

2.7.2

wagnerrp commented 12 years ago

Same here, works fine.

Python 2.7.2 (default, Jan 14 2012, 03:45:25) 
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9
Type "help", "copyright", "credits" or "license" for more information.
>>> import tmdb3
>>> tmdb3.set_key('c27cb71cff5bd76e1a7a009380562c62')
>>> m = tmdb3.Movie(3131)
>>> c = m.crew[0]
>>> c
<Crew 'Martin Scorsese','Director'>
>>> c.job
u'Director'
>>> c
<Crew 'Martin Scorsese','Director'>
kasrak commented 12 years ago

Strange, it just started working with no changes on my end.