MovieGrabber - Completely Automated Movie Downloader

Got a program that plays well with SABnzbd? Share it here!
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: MovieGrabber - completely automated movie downloader

Post by binhex »

winniwinter wrote:Hi,

no I installed 2.7 and created a symlink to /usr/bin/python .

This is what the Terminal tells me:
Python 2.7.0+ (r27:82500, Sep 15 2010, 18:04:55)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
ok i think this has to do with the symbolic link you are using, for some reason its not loading the _imaging module for PIL (python imaging library) and thus your getting the error, can you try download and running the following script in the root folder of moviegrabber

http://www.mediafire.com/?e8d8onx3whe9i

it should print out some basic info about your setup, im guessing it will fail when attempting to load module _imaging.

another thing you can try is to run "python -v" and then "import Image" if you can copy/paste the output of this command it may give me some more details.

here is a decent article about the exact issue your seeing:- http://effbot.org/zone/pil-imaging-not-installed.htm

binhex.
winniwinter
Newbie
Newbie
Posts: 21
Joined: January 21st, 2011, 2:49 am

Re: MovieGrabber - completely automated movie downloader

Post by winniwinter »

Hi, thanks a lot for your help! O0

python -v ...

Code: Select all

>>> import Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Image
testscript:

Code: Select all

python testpaths.py
python sys.path is as follows:- ['/home/user/Documents', '/usr/lib/python2.7', '                                                    /usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.                                                    7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-pac                                                    kages', '/usr/lib/python2.7/dist-packages', '/home/user/Documents/lib/sitepackag                                                    es', '/home/user/Documents/lib/moviegrabber']
trying to load Image module
load of module Image failed
Traceback (most recent call last):
  File "testpaths.py", line 10, in <module>
    import Image
ImportError: No module named Image

trying to load _imaging module
load of module _imaging failed
Traceback (most recent call last):
  File "testpaths.py", line 22, in <module>
    import _imaging
ImportError: No module named _imaging
[code]

as far as I can see the imaging module nerver get's loaded :(
[code]
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.7/site.pyc matches /usr/lib/python2.7/site.py
import site # precompiled from /usr/lib/python2.7/site.pyc
# /usr/lib/python2.7/os.pyc matches /usr/lib/python2.7/os.py
import os # precompiled from /usr/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.7/posixpath.pyc matches /usr/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/lib/python2.7/posixpath.pyc
# /usr/lib/python2.7/stat.pyc matches /usr/lib/python2.7/stat.py
import stat # precompiled from /usr/lib/python2.7/stat.pyc
# /usr/lib/python2.7/genericpath.pyc matches /usr/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/lib/python2.7/genericpath.pyc
# /usr/lib/python2.7/warnings.pyc matches /usr/lib/python2.7/warnings.py
import warnings # precompiled from /usr/lib/python2.7/warnings.pyc
# /usr/lib/python2.7/linecache.pyc matches /usr/lib/python2.7/linecache.py
import linecache # precompiled from /usr/lib/python2.7/linecache.pyc
# /usr/lib/python2.7/types.pyc matches /usr/lib/python2.7/types.py
import types # precompiled from /usr/lib/python2.7/types.pyc
# /usr/lib/python2.7/UserDict.pyc matches /usr/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/lib/python2.7/UserDict.pyc
# /usr/lib/python2.7/_abcoll.pyc matches /usr/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /usr/lib/python2.7/_abcoll.pyc
# /usr/lib/python2.7/abc.pyc matches /usr/lib/python2.7/abc.py
import abc # precompiled from /usr/lib/python2.7/abc.pyc
# /usr/lib/python2.7/_weakrefset.pyc matches /usr/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /usr/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /usr/lib/python2.7/copy_reg.pyc matches /usr/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.7/copy_reg.pyc
# /usr/lib/python2.7/sysconfig.pyc matches /usr/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /usr/lib/python2.7/sysconfig.pyc
# /usr/lib/python2.7/re.pyc matches /usr/lib/python2.7/re.py
import re # precompiled from /usr/lib/python2.7/re.pyc
# /usr/lib/python2.7/sre_compile.pyc matches /usr/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.7/sre_parse.pyc matches /usr/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.7/sre_parse.pyc
# /usr/lib/python2.7/sre_constants.pyc matches /usr/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /usr/lib/python2.7/sre_constants.pyc
# /usr/lib/python2.7/sitecustomize.pyc matches /usr/lib/python2.7/sitecustomize.py
import sitecustomize # precompiled from /usr/lib/python2.7/sitecustomize.pyc
import encodings # directory /usr/lib/python2.7/encodings
# /usr/lib/python2.7/encodings/__init__.pyc matches /usr/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.7/encodings/__init__.pyc
# /usr/lib/python2.7/codecs.pyc matches /usr/lib/python2.7/codecs.py
import codecs # precompiled from /usr/lib/python2.7/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.7/encodings/aliases.pyc matches /usr/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.7/encodings/aliases.pyc
# /usr/lib/python2.7/encodings/utf_8.pyc matches /usr/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.7/encodings/utf_8.pyc
it really looks like I don't have an imaging module. I installed python 2.7 with apt-get install python2.7. Maybe that was a mistake?
Should I manually download Python 2.7.2 from here ?
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: MovieGrabber - completely automated movie downloader

Post by binhex »

you can def try upgrading to python 2.7.2, it def wont break anything, but i fear your issue is all to do with your use of symbolic links and nothing to do with python.

my theory is that the python search path is looking in the wrong place for python modules due to the symbolic link and thus PIL is failing to load the _imaging module.

is there any way you can disable/delete the symbolic link and just run moviegrabber from the real location?.
winniwinter
Newbie
Newbie
Posts: 21
Joined: January 21st, 2011, 2:49 am

Re: MovieGrabber - completely automated movie downloader

Post by winniwinter »

Ok ok, I think I'm no one step closer to the solution. What I now did was that

Code: Select all

export PYTHONPATH="$PYTHONPATH:/usr/lib/python2.6/dist-packages"
now I get this output for the testpaths.py

Code: Select all

python sys.path is as follows:- ['/media/Videos/TEMP', '/usr/local/sbin/moviegrabber/logs', '/usr/lib/python2.6/dist-packages', '/u        sr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/python2        .6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/li        b/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/us        r/lib/python2.7/dist-packages', '/usr/local/sbin/moviegrabber/logs/lib/sitepackages', '/usr/local/sbin/moviegrabber/logs/lib/movieg        rabber']
trying to load Image module
load succesful
trying to load _imaging module
load succesful
and "import Image" works now also


but still an error in moviegrabber

Code: Select all

18/10/2011 05:50:15 Error In Poster Download Function
Traceback (most recent call last):
  File "MovieGrabber.py", line 1695, in PosterDownload
    poster_image.load()
  File "/usr/local/sbin/moviegrabber/lib/sitepackages/PIL/ImageFile.py", line 164, in load
    self.load_prepare()
  File "/usr/local/sbin/moviegrabber/lib/sitepackages/PIL/ImageFile.py", line 231, in load_prepare
    self.im = Image.core.new(self.mode, self.size)
  File "/usr/local/sbin/moviegrabber/lib/sitepackages/PIL/Image.py", line 37, in __getattr__
    raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed
18/10/2011 05:50:15 Error In NZBMatrix RSS Function
Traceback (most recent call last):
  File "MovieGrabber.py", line 2529, in RunDownloader
    PosterDownload()
  File "MovieGrabber.py", line 1741, in PosterDownload
    ErrorLogging("Poster Download Function")
  File "MovieGrabber.py", line 1695, in PosterDownload
    poster_image.load()
  File "/usr/local/sbin/moviegrabber/lib/sitepackages/PIL/ImageFile.py", line 164, in load
    self.load_prepare()
  File "/usr/local/sbin/moviegrabber/lib/sitepackages/PIL/ImageFile.py", line 231, in load_prepare
    self.im = Image.core.new(self.mode, self.size)
  File "/usr/local/sbin/moviegrabber/lib/sitepackages/PIL/Image.py", line 37, in __getattr__
    raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: MovieGrabber - completely automated movie downloader

Post by binhex »

hmm ok im no linux guru either so getting a bit out of my depth here :-), ok so looking at your python 2.6.x install it looks like you actually have PIL installed is that correct?, as the path is not pointing at MovieGrabber "/usr/lib/python2.6/dist-packages/PIL/Image.pyc matches /usr/lib/python2.6/dist-packages/PIL/Image.py"

so you got two versions of python on your system?, this is going to make things a bit more difficult, are you def loading moviegrabber using python 2.7.x and NOT 2.6.x?.

one thing you could attempt to do is copy all files and folders located in moviegrabber/lib/sitepackages/ to your python 2.7.x/Lib/site-packages/ folder this should then allow them to be loaded, its a bit of a workaround and its not ideal but i think it should work.

binhex.
winniwinter
Newbie
Newbie
Posts: 21
Joined: January 21st, 2011, 2:49 am

Re: MovieGrabber - completely automated movie downloader

Post by winniwinter »

well as I said I installed it with apt..and just changed the symbolic link.
Yes I'm sure that I'm loading moviegrabber with python2.7 because when I first tried it I imediatly got an error that said that I need to run it with python2.7 :(

Ok, I copied the files. New error now :( :(

Code: Select all

18/10/2011 06:12:16 Error In NZBMatrix RSS Function
Traceback (most recent call last):
  File "MovieGrabber.py", line 2322, in RunDownloader
    GlobalVars.post_title = post_title.decode("utf-8")
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-16: ordinal not in range(128)
18/10/2011 06:12:19 Error In NZBMatrix RSS Function
Traceback (most recent call last):
  File "MovieGrabber.py", line 2322, in RunDownloader
    GlobalVars.post_title = post_title.decode("utf-8")
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-16: ordinal not in range(128)
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: MovieGrabber - completely automated movie downloader

Post by binhex »

ok have a look in the webgui in history/view history, can you see any movies listed?.
winniwinter
Newbie
Newbie
Posts: 21
Joined: January 21st, 2011, 2:49 am

Re: MovieGrabber - completely automated movie downloader

Post by winniwinter »

oh wow,

yes I see one
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: MovieGrabber - completely automated movie downloader

Post by binhex »

hi winniwinter sorry for the delay in responding, the ascii codec encode issue is resolved in the next version, out hopefully by the end of this week, i don't know why its so prominent for you, perhaps you are referencing a lot of foreign content. i have only seen this issue and picked up what the issue was very recently, so i was suprised to see you hit the issue so quickly. in any case i would advise waiting for 2.1.0 and give this is a try, now you have the modules in place it should simply be a case of upgrading moviegrabber.
winniwinter
Newbie
Newbie
Posts: 21
Joined: January 21st, 2011, 2:49 am

Re: MovieGrabber - completely automated movie downloader

Post by winniwinter »

thanx for your reply. I cant wait ;)
mike171562
Newbie
Newbie
Posts: 37
Joined: June 5th, 2009, 12:37 pm

Re: MovieGrabber - completely automated movie downloader

Post by mike171562 »

Just installed on a Ubuntu Linux Server and all works well. Thanks. I have a suggestion, on the History page, a 'Download' button would be nice to manually add tittles that were rejected based on my set criteria.


Edit:

I added a 'dllink' column in the History table and populate it with GlobalVars.download_link


then added a "Download Anyway" link to the 'history_view' template that uses the Sabnzbd addurl api, it works well.
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: MovieGrabber - completely automated movie downloader

Post by binhex »

mike171562 wrote:Just installed on a Ubuntu Linux Server and all works well. Thanks. I have a suggestion, on the History page, a 'Download' button would be nice to manually add tittles that were rejected based on my set criteria.


Edit:

I added a 'dllink' column in the History table and populate it with GlobalVars.download_link


then added a "Download Anyway" link to the 'history_view' template that uses the Sabnzbd addurl api, it works well.
hi mike171562, good suggestion, and one that somebody made just recently, so its added to my to do list :-). i see youve added it in yourself, good work there you obviously know what your doing :-), i could go down the same route of using sabnzbd api but this does mean adding in another section to add in your sabnzbd api key/host/port etc and also means this feature wouldnt work with any other usenet binary downloader (e.g. grabit, or newzbin) so i think i will probably get moviegrabber to do the downloading of the nzb and send to watched folder for processing.

binhex.
mike171562
Newbie
Newbie
Posts: 37
Joined: June 5th, 2009, 12:37 pm

Re: MovieGrabber - completely automated movie downloader

Post by mike171562 »

that would be a much better way to do it, I was looking for a quick and dirty solution that didn't butcher up your code too much, I look forward to seeing your update, nice work!
apdedman
Newbie
Newbie
Posts: 12
Joined: October 9th, 2011, 3:50 am

Re: MovieGrabber - completely automated movie downloader

Post by apdedman »

Hello,
I have added the following settings to Movie Grabber and when i click "run now" nothing happens. Can you please check my below settings to see if i have missed some thing. Thanks

Image

Image

Image


Image
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: MovieGrabber - completely automated movie downloader

Post by binhex »

Hello,
I have added the following settings to Movie Grabber and when i click "run now" nothing happens. Can you please check my below settings to see if i have missed some thing. Thanks
hi apdedman, im assuming you have looked in history/view history and can see no movies shown is this correct?. Also just to confirm you are copying your "current api key" from https://nzbmatrix.com/account.php yes?.
Post Reply