Home » Home Media » How to fix script failed error and make XBMC ESPN addon work?

How to fix script failed error and make XBMC ESPN addon work?

written by Anand August 31, 2013

In the recent months the XBMC ESPN addon errors out with “script failed” error message as shown in the picture below. Using this ESPN plugin by bluecop is one of the 3 ways to watch ESPN on XBMC. Many users of the XBMC ESPN addon have reported “Script Failed!: plugin.video.espn3”, including on htpcBeginner. Football season is here (Go Buckeyes!) and it would be great to fix the script failed error message and get the XBMC ESPN addon to work. This plugin not only allows you to watch Live games but also go back and replay content from the past. This post describes the proper way to configure the XBMC ESPN plugin. This procedure has been verified to work in the latest version (0.9.9) of the plugin. [Read: 5 Websites to watch College Football online for free]

XBMC ESPN Addon Script Failed Error

XBMC Error Script Failed


First, a minor clarification: even though the XBMC ESPN plugin has options for login and choosing channels (ESPN, ESPN2, etc.) the plugin only works for ESPN3. XBMC ESPN addon or XBMC ESPN3 addon both refer to the same plugin.

Best Kodi Addons:

The main requirement for the XBMC ESPN plugin to work is a valid Time Warner Cable or Comcast username and password. Even though you will be watching ESPN through your internet, your account should also be subscribed to receive ESPN cable content. Once the procedure below is completed you do not need ESPN subscription nor the account login anymore as the cookie once set is valid for several years. If you do not subscribe to ESPN’s cable content, you may have good friends… 😉 ;-). [Read: Free Movies and TV shows bittorrent streaming with Popcorn Time]

Other requirements are:

  • Works only in US. You may use a VPN Service such Kepard to obtain an US IP Address.
  • On Linux, you need librtmp / rtmpdump version 2.4 or better. If you are using any of the latest releases, you should be fine.
  • Firefox with Cookie Manager plugin or Google Chrome with Edit This Cookie extension
  • Working XBMC installation

This post shows the procedure with Firefox and Cookie Manager addon but accomplishing the task with Chrome is just as easy.

Enjoy unlimited streaming of Movies and TV Shows on several devices, free 2-day shipping on orders, and free Kindle books for only $6.60 per month. Sign-up now to get a free 1-month trial.

1. Uninstall Existing ESPN XBMC Addon

First, uninstall the existing XBMC ESPN3 plugin. You can uninstall the plugin through XBMC interface or manually delete the following two folders:

The existing ESPN3 addon folder:



and ESPN3 addon’s data folder:



2. Get ESPN Cookie

Once you have all the requirements ready, visit WatchESPN website, login with your TWC or Comcast login, and start watching any of the live shows. [Read: How to setup Chromecast using your phone or tablet?]

WatchESPN Login

WatchESPN Login

Once the show starts playing, close the browser window and reopen browser. Go to Tools->Cookie Manager to open the Cookie Manager. You should know see a list of all the cookies that have been set in your browser.

Firefox ESPN Cookie

Firefox ESPN Cookie

Search for “swid” and you should only see one entry show up. Note down (or copy / save) everything that is listed under “Content”, including { and }. The whole thing should look something like this (your numbers / characters may vary):


You will need this in the next step.

Best Android TV Boxes:
  1. NVIDIA SHIELD TV Pro Home Media Server - $299.99 editors pick
  2. Amazon Fire TV Streaming Media Player - $89.99
  3. WeTek Play 2 Hybrid Media Center - $134.00
  4. Kukele Octacore Android TV Box - $179.99
  5. U2C Android TV Box - $95.99

3. Install the XBMC ESPN3 Addon

Kudos to Locomot1f for modifying the plugin to work with ESPN again. Visit the ESPN3 addon development page on GitHub and download the latest plugin as a zip file as shown in the picture below. [Read: 5 Best XBMC skins for Raspberry Pi]

XBMC ESPN Addon3 on GitHub

XBMC ESPN Addon on GitHub

After download, extract the zip file, and rename the “plugin.video.espn3-master” folder to “plugin.video.espn3”. Then move the “plugin.video.espn3” folder to the following location:



You have now installed the new XBMC ESPN3 plugin. Alternatively, you could choose to install the zip file through XBMC interface. Open and run the addon through XBMC once and try to play any video. The script may error out but that’s fine. [Read: 15 XBMC keyboard shortcuts you should know]

4. Create userdata.xml File

Next, navigate and find the XBMC ESPN addon data folder. Below are the typical locations in Windows and Linux platforms:



Continued in next page

Ignore the settings.xml or videocache.xml files. This file will be automatically modified based on your configuration (described below). If userdata.xml already exists, rename it to userdata.backup.xml or something else. Then create a new userdata.xml file and copy the contents below to it. I suggest using Notepad++.

ESPN Addon userdata.xml for TWC

ESPN Addon userdata.xml for TWC (full text)

The above code is for TWC login. For Comcast login, replace the content between the affiliate tags (lines 3 to 8) with the following:

ESPN Addon Userdata for Comcast

ESPN Addon Userdata for Comcast (full text)

Here are the things that need to be changed:

  • XXX.XXX.XXX.XXX – Replace with your current IP Address
  • YYYYYYYY – Replace with your current city name (eg: chicago)
  • ZZZZZZZ – Replace with your current state name (eg: illinois)
  • DOMAIN.COM – Replace with your current internet provider’s domain. For TWC’s road runner internet it is rr.com. If you do not know your provider’s domain then visit this page and search by IP Address:


    You can find your domain in the results the display results. [Read: 10 of the Best XBMC Addons in 2014]


  • {6xxxx-xxxxxxx-xxxxxx-xxxxxxxxx-xxxxxxxxxxxx2} – Replace with your SWID determined in Step 1.

Note that you internet does not have to be from the same provider as the cable provider whose login details you used in Step 1. Consequently, in <affiliate rel=”nofollow” target=”_blank”></affiliate> you may have one provider (the cable provider whose login you used) and in <location></location> you may have the details from a different provider (current internet provider).

Save the userdata.xml file and exit. Again, ignore other files/folders, including settings.xml.

5. Configure ESPN Addon

Next configure the XBMC ESPN Addon properly to avoid the “script failed!: plugin.video.espn3” error. It is important that you finish configuring the XBMC ESPN plugin before you open the addon or else your userdata.xml file may be overwritten by the addon. Go to Addon Settings and configure it as shown in the pictures below.

Playback SetttingsLogin SettingsChannels SettingsReplay Settings

You may provide the login details under Login but you will not need to use it (notice that Login is disabled). Save and exit XBMC ESPN Addon Settings. Your settings.xml will be updated with the changes you made.

Best Android TV Boxes:
  1. NVIDIA SHIELD TV Pro Home Media Server - $299.99 editors pick
  2. Amazon Fire TV Streaming Media Player - $89.99
  3. WeTek Play 2 Hybrid Media Center - $134.00
  4. Kukele Octacore Android TV Box - $179.99
  5. U2C Android TV Box - $95.99

6. Enjoy Watching ESPN on XBMC

You you may open the addon browse live events or go back and replay past content (based on your replay settings above).

Live Event from ESPN3

Live Event from ESPN3


Searching the internet, you will find that a lot of users have expressed difficulty getting this XBMC ESPN plugin to work. The most common issue is the “Script Failed!: plugin.video.espn3” error. Hopefully this post provided you with clear instructions on how to get the plugin to work. Understand that even though plugin offers login options and more ESPN channel options (ESPN, ESPN2, ESPNU, etc.) they do not work and all my attempts so far have been futile. But ESPN3 works very well and you should have no problems watching Live content or replaying old content. So there you go. Enjoy watching ESPN using the XBMC ESPN addon.

Update (12/01/2013): Thanks to Lukeshow for sharing the latest fix for the XBMC ESPN Addon’s script failed error with me. I have tested the new fix and the addon now works perfectly for ESPN3 content.

IPVanish VPN Exclusive 20% Off - only $5.19/month:
VPN Guides
Windows, Android, Ubuntu
Kodi OpenVPN
♦ Hide your browsing (no logs), Anonymize Streaming and Downloads
♦ Circumvent Geo/Country Restrictions and access worldwide content
♦ Works on Windows, Mac, Linux, Android, iOS, Router, and more
♦ Money back guarantee - Sign Up Now
Super Hot deal for National Cybersecurity Awareness Month. 2-years premium VPN from IPVanish for $99 (only $4.12 per month)

Related Articles


Joel August 31, 2013 - 8:13 pm

Hmm… these instructions seem to be incomplete. I can’t download the mentioned default.py, and when I try to go to page 2 of the article, the server returns a 404

Anand August 31, 2013 - 11:14 pm

Sorry about that. Fixed it now.

Anand September 1, 2013 - 7:56 am

Joel, sorry about that. For some reason the server would not allow downloading .py files. Fixed and provided 2 sources now. Hope it works.

lukeshow September 1, 2013 - 9:09 am

Anand… you are the MAN! AND a Buckeye! Unfortunately, I still get the 404 error when trying to navigate to the second page.

Anand September 1, 2013 - 10:31 am

Wow…too many 404s on this post. Thats what happens when you try to get something out quick. Fixed the navigation link as well. Thanks luckeshow.

lukeshow September 1, 2013 - 11:21 am

Anand… still get an error (just script characters) when I try to navigate to the 2nd page.

Anand September 1, 2013 - 11:25 am

Hmm…I think you might have to refresh your page or clear out of your browser cache and retry. Here is the link to page 2.


Everything works for me. Let me know if you still have troubles.

lukeshow September 1, 2013 - 12:31 pm

I got the navigation to work… unfortunately, I followed directions and still received the script error.

Anand September 1, 2013 - 7:30 pm

Hmm…I am not sure what is going on in your case. Have satisfied all the requirements? If so, may be uninstall and reinstall?

Rob Christie September 10, 2013 - 8:02 pm

I was really excited to find a recent article about how to get this to work, but unfortunately I’m still getting the script error as well. In the last step, you say notice that Login is disabled, but the only Login option I see (“Enable Login”) in the screenshots is enabled. Am I missing something? What about the cookies.lwp and settings.xml files? What should we do with those? Thanks for any insight you might be able to provide.

Anand September 11, 2013 - 9:04 am

Rob, I apologize for the discrepancy. I have updated the screenshot to show that login is disabled. This however, should not have any effect because, the plugin worked for me in both cases. Do not worry about any other files in the data folder. The only file you have to edit manually is the userdata.xml file. I have updated the post to clarify this.

I noticed that there were unnecessary spaces added to the userdata.xml file code block by WordPress when I save the post. Not sure if this causes script error. Will test it this evening. In any case, I have replaced the codes with images and provider external links to userdata.xml and other code blocks. You may try it now by creating fresh userdata.xml by copy-pasting the codes from the new links. I suggest you uninstall the plugin and delete the data folder and start from scratch.

lukeshow September 11, 2013 - 8:41 am

Anand… I am still getting the error as well. Followed the directions in this article. Did a full uninstall of the ESPN plug-in (including deleting subfolders), reinstalled, then followed directions again, and still getting error!

Thanks for your effort though, at least I have someone out there that’s trying to help me out with this!

Anand September 11, 2013 - 9:07 am

lukeshow, I am impressed with your perseverance. Please see my comment above. WordPress was adding unnecessary spaces to the my code blocks. So I have provided new links to the userdata.xml files. The only suggestion I have for you at this point is to start from scratch (again) and try to the new code blocks.

By the way, are you able to login and watch live events at espn3.com or watchespn.com?

lukeshow September 11, 2013 - 3:40 pm

Redid everything again with the new text and I am still getting an error message. I can view videos on espn3 and watchespn, but get the “script failed” error on xbmc. Would you be willing to take a look at my userdata.xml to see if it’s set up correctly?

Anand September 12, 2013 - 8:25 am

Sure. Along with your userdata.xml let me know the following:

1. What system (desktop/laptop/raspberry pi, etc.)
2. What OS and release/version
3. How did you install XBMC compile or executable file or repository
4. Your internet provider name
5. Your cable TV provider name (or the cable provider’s credentials you used to get the SWID)

lukeshow September 13, 2013 - 1:20 pm

1. Desktop
2. Windows 7 64-bit
3. Installed XBMC from an executable file
4. Time Warner Cable (rr.com)
5. Time Warner Cable

What is the best way to send you the userdata.xml?

Anand September 13, 2013 - 2:08 pm

@lukeshow I sent you an email, you can respond to that with your userdata.xml. I will test it out on Windows 7 64 bit and get back to you.

john tento October 2, 2013 - 8:31 pm

any idea what could be causing this error? I believe I’ve followed the instructions to a “t” and did a fresh install…

20:25:48 T:1960 NOTICE: –>Python Interpreter InitializedPython callback/script returned the following error<–
Error Type:
Error Contents: ‘NoneType’ object is unsubscriptable
Traceback (most recent call last):
File “C:\Users\XXX\AppData\Roaming\XBMC\addons\plugin.video.espn3\default.py”, line 592, in
File “C:\Users\XXX\AppData\Roaming\XBMC\addons\plugin.video.espn3\default.py”, line 222, in PLAYESPN3
File “C:\Users\XXX\AppData\Roaming\XBMC\addons\plugin.video.espn3\default.py”, line 253, in PLAY
playedId = mediaFramework[‘playerid’]
TypeError: ‘NoneType’ object is unsubscriptable
–>End of Python script error report<–
20:25:49 T:5296 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.espn3/?url=%26partnerContentId%3D1197417%26eventId%3D176-181203%26contentId%3D31069403&mode=4&name=Fluminense+vs.+Botafogo+%28SPA%29]
20:25:49 T:5772 NOTICE: Thread Background Loader start, auto delete: false
20:25:53 T:3108 NOTICE: Thread XBPyThread start, auto delete: false

Mark Ezzell October 12, 2013 - 1:43 pm

Hi – I followed the steps as well and can get to the media. However, whenever i try and stream something i get a script error. Can I share my log, userdata and default.py data with you and see if you have any thoughts.

XMBC is installed on a Raspberry Pi (running XBIAN)
Completed all steps using Mozilla Firefox running on Windows 7 32 bit
used notepad++ to edit files, winscp to transfer

Mark October 12, 2013 - 2:12 pm

Any idea what may cause the stream to create a script error? I’m in the app and can select something to view but get a script error on everything i select (followed directions above and using XBIAN on Raspberry Pi)

Anand October 13, 2013 - 8:06 am

Mark, if you followed in the instructions and still could not get it to work then I have further ideas. But it seems that something has changed in the way ESPN delivers their content that has made the fix not work anymore. Other readers have reported the same problem. I will update the post.

INTRODUCING the XBMC HUB WIZARD! - Page 20 October 12, 2013 - 2:26 pm

[…] major for me. Anywho, i have gotten my ESPN app to open up again by following the directions @ https://www.smarthomebeginner.com/fix-scri…mc-espn-addon/ However, i get a script error every time i try and watch any stream in the app. I can upload my […]

espn app script error October 12, 2013 - 4:30 pm

[…] worked before but won't load at all now. ok, so i updated my espn app following this guide. https://www.smarthomebeginner.com/fix-scri…mc-espn-addon/ I'm able to get the app to load and navigate to media. However, whenever i attempt to play media i […]

jamie November 18, 2013 - 12:18 am

That actually got mine to half way work

I get some streams from the replays, but nowhere near all. They work too.

I can not get any live streams to work

James June 14, 2014 - 2:38 pm

How would I get this done on an android system? I get the failed script error, but if you try navigating to watch ESPN using any of the browsers, it redirects to a link wanting you to download the app. I have the app installed on the device and I’m logged into it, if that helps.

Scott August 2, 2014 - 1:30 pm

Why does the web browser come into play when using the XBMC ?
If I want to use web browser then I would not install XBMC .

Sounds cryptic for the beginner !

Anand August 3, 2014 - 5:57 am

ESPN addon needs the subscriber ID to work properly. There is only one way to get it – from the cookie set in your browser. Once you get the subscriber id and create the userdata.xml, you do not need the browser anymore and you can use the same userdata.xml on any other devices, even those that do not have a browser.

loc September 1, 2014 - 11:25 pm

is this procedure still current as of sept 1, 2014? simply downloading the ESPN3 App from the xbmc repo allowed me to watch espn3 content (using rasp pi with raspbmc) that didnt require a log in, such as the Miami vs. Louisville football game from the sky cam. Of course the actual broadcast wasn’t even an option on the rasp pi like it was thru my laptop (mac). and under the options for the ESPN3 App in the video add-on settings there are only 2 options “Playback” and “Days.” will the above procedure fix it where there will be more options to enter in login information to watch more live events?


ed September 26, 2014 - 8:10 pm

This still works for me to get ESPN3. As a paid subscriber to Time Warner, I wish I could make it work for ESPN and ESPN2. Personally this would free me from cable. Anyways hope they figure that out. As a side note, maybe getting XBMC to run android apks would allow you to do this? Not a programmer so no idea if this is even a possibility.

Zack January 27, 2015 - 11:01 am


I’m a Dish Subscriber, and the logon seems to only work for Comcast, AT&T, Verizon, Time Warner, Bright House, Insight, and Cox.

The ESPN Website accepts Dish, is there a way to get the add-on to also accept dish users?

MikeG July 5, 2015 - 9:44 pm

So, i know it’s almost 2 years later, but… i read through the instructions and skimmed the comments. I’m VERY confused about something. Why do we need to log in to watchespn.com or espn.go.com? ESPN3 is free to all and does not require a username or password. Why does the add-on still require one to log on and obtain a cookie?

Dominic August 2, 2015 - 10:40 pm

I can’t find the directory structure you have listed under section 4 above for Linux:


I’m trying to update the Raspberry Pi 2 with OSCM operating system running Kodi Helix 14.2. The directory structure is much different than what you show. I’m not that well versed in Linux to determine where to put the userdata,xml file. Can you offer any assistance?

Anand August 3, 2015 - 11:16 am

XBMC is now Kodi. So try:



Leave a Comment