1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PyTivo Video Manager HME App for pyhme

Discussion in 'Developers Corner' started by jbernardis, Apr 20, 2011.

  1. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    I dunno what you're doing for metadata, but feel free to just import metadata.py from pyTivo.

    ("Hybrid XML" is a sick concept. But anyway, we've already dealt with it in metadata.py.)
     
  2. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Thanks Bill. I was already planning on doing that. I used your code previously, although I altered it for what I needed. I've already isolated the portions of metadata.py that deal with nfo files and was simply planning on merging that into my existing code.

    I don't anticipate any issues, but I'm not going to be able to get to it for a few days. The soonest would be after the weekend.
     
  3. Aug 3, 2014 #683 of 735
    jeepguy_1980

    jeepguy_1980 Unregistered User

    250
    0
    Mar 1, 2008
    Newport...
    Were you able to get to it this weekend?

    Sent from my HTC6525LVW using Tapatalk
     
  4. cweb

    cweb New Member

    106
    0
    May 29, 2004
    I had a working setup that was doing great for the longest time on my Mac running 10.9.4. I just recently noticed that it stopped working and I can't figure out why. I'm sure I must have changed something, but don't know what. The terminal output is as follows:

    cd '/Applications/hme-python/' && '/usr/local/bin/pythonw' -S '/Applications/hme-python/start.py' && echo Exit status: $? && exit 1
    HME Server for Python 0.20
    Not using Zeroconf: No module named zeroconf
    Skipping: vidmgr - No module named Image
    Sun Sep 7 10:21:26 2014 Server Starts

    Any help would be appreciated.
     
  5. lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    First thing to do is make sure you are running the latest versions of vidmgr and pyTivo.
     
  6. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    This says that you don't have the Python Imaging Library installed.
     
  7. cweb

    cweb New Member

    106
    0
    May 29, 2004
    What is PIL installed as part of? Hme-python? Vidmgr? OS? something else?

    It use to work. What may have broken it? This may not be relayed, but pytivo and strambaby still work.

    Thanks.
     
  8. Allanon

    Allanon Member

    580
    0
    Nov 2, 2005
    PIL is an image processing module for Python. Might try re-installing it.
     
  9. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    It's not part of anything. It's a separate package.

    I'm guessing (based on that "/usr/local/bin") that it broke when you installed a new version of Python.

    Nowadays you probably want to use Pillow.
     
  10. cweb

    cweb New Member

    106
    0
    May 29, 2004
    I just installed Pillow and the log seems to look better and it appears that vidmgr now gets loaded. However I am still not seeing vidmgr on the Tivos. Also, I still am getting the Zeroconf error.

    log:
    ~ cliff$ cd '/Applications/hme-python/' && 'python' '/Applications/hme-python/start.py' && echo Exit status: $? && exit 1
    HME Server for Python 0.20
    Not using Zeroconf: No module named zeroconf
    Sat Sep 13 18:30:57 2014 PyTivo Video Manager version 2.2f module initializing
    Loading thumbnail cache
    100 thumbnails loaded from cache
    Sat Sep 13 18:30:58 2014 Server Starts

    Any additional thoughts? Thanks in advance.
     
  11. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    Well, it's not finding zeroconf.py. It should be there right next to start.py.
     
  12. cweb

    cweb New Member

    106
    0
    May 29, 2004
    Well I am getting closer. The zeroconf.py was there, but something, somewhere must have gone bad. I reinstalled hem-python and the vidmgr files and deleted the .pyc files. I see from the output (see below) the the vidmgr server is registered and I see VidMgr in the Tivo Apps and can go into it from the tiro. However, after pressing a few keystrokes Vidmgr just hangs and I have to exit to regain control of the tiro. The terminal output shows there is an exception, but I am not sure how to interpret it.

    On another note, which may or may not be related. If I run the buildcache.py or the rebuild (three thumbs down) from within the app, they appear to run and process fine with no errors. However, the thumbs.cache doesn't actually get updated. I don't know if it is write it somewhere else.

    As usual, all help is appreciated.

    The vidmgr output is:
    cd '/Applications/hme-python/' && '/usr/local/bin/pythonw' '/Applications/hme-python/start.py' && echo Exit status: $? && exit 1
    Mac-Desktop-Quad-Core:~ cliff$ cd '/Applications/hme-python/' && '/usr/local/bin/pythonw' '/Applications/hme-python/start.py' && echo Exit status: $? && exit 1
    HME Server for Python 0.20
    Sun Sep 14 23:02:54 2014 PyTivo Video Manager version 2.2f module initializing
    Loading thumbnail cache
    100 thumbnails loaded from cache
    Sun Sep 14 23:02:56 2014 Server Starts
    Registering: vidmgr
    192.168.1.118 - - [14/Sep/2014 23:03:22] "GET /vidmgr/ HTTP/1.1" 200 -
    192.168.1.118 - - [14/Sep/2014 23:03:22] Starting HME: vidmgr
    Vidmgr thread entering startup
    Vidmgr Entering Handle Resolution
    Checking resolution 1280, 720
    Found an HD resolution
    Vidmgr thread activating
    Vidmgr Entering Handle Resolution
    Checking resolution 1280, 720
    Found an HD resolution
    Processing video share Tivo Share
    2169 Videos found
    Processing video share Tivo Share2
    294 Videos found
    Processing video share Brothers and Sisters
    30 Videos found
    All Shows (grouped by Series Title) count: 2493 videos in 135 groups
    Alphabetical Groups count: 2493 videos
    192.168.1.118 - - [14/Sep/2014 23:04:18] Ending HME: vidmgr
    192.168.1.114 - - [14/Sep/2014 23:44:06] "GET /vidmgr/ HTTP/1.1" 200 -
    192.168.1.114 - - [14/Sep/2014 23:44:06] Starting HME: vidmgr
    Vidmgr thread entering startup
    Vidmgr Entering Handle Resolution
    Checking resolution 1280, 720
    Found an HD resolution
    Vidmgr thread activating
    Vidmgr Entering Handle Resolution
    Checking resolution 1280, 720
    Found an HD resolution
    Processing video share Tivo Share
    2169 Videos found
    Processing video share Tivo Share2
    294 Videos found
    Processing video share Brothers and Sisters
    30 Videos found
    All Shows (grouped by Series Title) count: 2493 videos in 135 groups
    Alphabetical Groups count: 2493 videos
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.114', 41583)
    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 595, in process_request_thread
    self.finish_request(request, client_address)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File "/Applications/hme-python/start.py", line 141, in __init__
    client_address, server)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 651, in __init__
    self.handle()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
    File "/Applications/hme-python/start.py", line 232, in do_GET
    self._page(True)
    File "/Applications/hme-python/start.py", line 186, in _page
    appinst.mainloop()
    File "/Applications/hme-python/hme.py", line 1139, in mainloop
    while self.active and self.get_event():
    File "/Applications/hme-python/hme.py", line 1192, in get_event
    handle(keynum, rawcode)
    File "/Applications/hme-python/vidmgr/__init__.py", line 246, in handle_key_press
    self.ddm.show(self.currentItem)
    File "/Applications/hme-python/vidmgr/DetailDisplayManager.py", line 66, in show
    thumb = self.getDirThumb(mapkey, otype == TYPE_DVDDIR)
    File "/Applications/hme-python/vidmgr/DetailDisplayManager.py", line 134, in getDirThumb
    data = self.tc.getImageData(tfn)
    File "/Applications/hme-python/vidmgr/ThumbCache.py", line 139, in getImageData
    pdata = resizePic(filename, self.width, self.height)
    File "/Applications/hme-python/vidmgr/ThumbCache.py", line 36, in resizePic
    pic = pic.resize((nwidth, nheight), img.ANTIALIAS)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.py", line 1290, in resize
    self.load()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageFile.py", line 164, in load
    self.load_prepare()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageFile.py", line 231, in load_prepare
    self.im = Image.core.new(self.mode, self.size)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.py", line 37, in __getattr__
    raise ImportError("The _imaging C module is not installed")
    ImportError: The _imaging C module is not installed
    ----------------------------------------
     
  13. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    You're back to the Python Imaging Library not working there.
     
  14. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    I'm having the same problem. Doing some searching, I think it is because it is expecting the files to be in /usr/lib, but at least some of them are in /usr/lib/86_64-linux-gnu. I tried creating the following symlinks, but it didn't help.

    ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/libz.so
    ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so.62 /usr/lib/
    ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so.6 /usr/lib/
     
  15. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    With Jeff's help, I got mine running, again. The first effective fix was to put

    import sys
    sys.path.append('/usr/lib/python2.7/dist-packages/PIL')

    at the top of ThumbCache.py. This worked to get vidmgr up and running, but it is a bit of a kludge, because it is a spot band-aid that only gets PIL working for that one script. The thing that was leading me astray was PIL was reporting properly installed by Debian's package manager, and in a sense it was loaded correctly. Unfortunately in this situation having the app loaded is not the end of the story. We were able to pinpoint the location of PIL and point to it with the path addendum above, but Python in general remained ignorant of the location of PIL. What worked for me was issuing the command:

    apt-get install python-imaging

    Python-imaging is reportedly a temporary compatibility package that creates a PIL.pth file which allows one to continue to use the `import image` directive in Python scripts.

    Anyone else suffering this issue is likely to need to load this package or an analogous one for your distribution.
     
  16. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    So, instead of adding this package, would it be sufficient to change "import Image" to "from PIL import Image"?
     
  17. lew

    lew Active Member

    3,950
    3
    Mar 12, 2002
    Minor issue:
    The
    [virtual share name X]

    section in the ini dis file should have # .

    You don't need to use virtual share but you need to complete the section if you don't either delete [virtual share name X] or change it to
    #[virtual share name X] to comment out the section.
     
  18. Oct 6, 2014 #698 of 735
    NJ Webel

    NJ Webel Member

    286
    0
    Dec 7, 2004
    Richmond, VA
    Anyone have any idea why vidmgr will load a temp file into my library of the file I'm trying to push, but the transfer never starts or completes?

    I am using a Base Roamio, connected via Ethernet to a HP Mediasmart EX485 running WHSv1.

    vidmgr is the version 2 installation.
     
  19. spaldingclan

    spaldingclan Member

    388
    0
    Aug 22, 2012
    how the hell do you install this in Windows 7? is this a linux only app?
     
  20. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    It's not Linux only. It's Python based so you'll need to install Python for Windows, wmcbrine's HME for Python framework, and have a working setup of pyTivo as well.

    This old thread may help, but there's a lot of Linux stuff in there. :rolleyes:
     

Share This Page