BeautifulSoup error

  • I working on new features in my zap2xml addon - but am having trouble getting BeautifulSoup to be recognized. I have added the following to the addon.xml:

    <import addon="script.module.beautifulsoup4" version="4.3.2"/>

    And can confirm the dependency installed and is running.

    I added the following to my addon script:

    from bs4 import BeautifulSoup

    But get the follwoing error when trying to run the script:

    from bs4 import BeautifulSoup ImportError: No module named bs4


    I'm not sure what is wrong - this is running on a modified drieschel/kszaq amlogic build - so maybe something is different in the amlogic builds? Thanks for any thoughts!

  • It's a grabber for tvheadend. I haven't updated the git with the changes I'm testing - but this is the addon:

    GitHub - edit4ever/script.module.zap2xml

    Do I append the path in the zap2xml.py file? The tv_grab_zap2xml file will call the python file when the grabber runs. The python script runs fine, but now that I'm testing the addition of BeautifulSoup I receive the error.

    Edited once, last by edit4ever (November 23, 2016 at 7:09 PM).

  • if you need something more portable you can do

    Python
    try:
        from bs4 import BeautifulSoup
    except ImportError:
        import sys
        sys.path.append('/storage/.kodi/addons/script.module.beautifulsoup4/lib')
        from bs4 import BeautifulSoup