Menu

trouble with python 2.5 maybe?

Richard
2007-08-22
2013-04-23
  • Richard

    Richard - 2007-08-22

    I'm trying to get this working on a new laptop which is python 2.5. I have beautiful soup and mplayer. When I go to run sipie I get the backtrace below. I'm a bit new to python and not sure if 2.5 effects urllib2?

    Thanks for any help. I simply love that I can toss this in a screen session and go.

    Rick

    -----------------------------------------------------------------
    $ ./sipie
    (c)Eli Criffield <pyeliATzendoDOTnet> http://eli.criffield.net/sipie/
    Licensed under GPLv2 http://www.gnu.org/licenses/gpl.txt

    Traceback (most recent call last):
      File "./sipie", line 22, in <module>
        Sipie.cliPlayer()
      File "/home/rharding/apps/Sipie-0.1181072404/Sipie/cliPlayer.py", line 66, in cliPlayer
        sipie = Player(config.items())
      File "/home/rharding/apps/Sipie-0.1181072404/Sipie/Factory.py", line 102, in __init__
        self.__setupOpener()
      File "/home/rharding/apps/Sipie-0.1181072404/Sipie/Factory.py", line 118, in __setupOpener
        opener = urllib2.build_opener(cookie_handler, proxy_handler)
      File "/usr/lib/python2.5/urllib2.py", line 467, in build_opener
        opener.add_handler(h)
      File "/usr/lib/python2.5/urllib2.py", line 303, in add_handler
        type(handler))
    TypeError: expected BaseHandler instance, got <type 'NoneType'>

     
    • Matt Davis

      Matt Davis - 2007-10-25

      A fix was suggested here:
      http://sourceforge.net/tracker/index.php?func=detail&aid=1813501&group_id=196723&atid=958597

      Here are the steps I followed to get this working in Ubuntu 7.10 (Python 2.5):
      1. If you haven't already, download, unzip, and install the latest Sipie version
      2. Save the text at the end of this post to "gutsy.patch"
      3. From the unzipped directory ("Sipie-0.1190648273"), run these commands:
        patch -n -i ../gutsy.patch Sipie/Factory.py
        python setup.py -q bdist_egg
        sudo cp dist/Sipie-0.1190648273-py2.5.egg /usr/lib/python2.5/site-packages/

      ============= Save this text below =============================================
      112a113
      >             opener = urllib2.build_opener(cookie_handler, proxy_handler)
      114,115c115
      <             proxy_handler = None
      <         opener = urllib2.build_opener(cookie_handler, proxy_handler)
      ---
      >           opener = urllib2.build_opener(cookie_handler)

       

Log in to post a comment.

MongoDB Logo MongoDB