2011-05-08, 16:57
I'm working on a MLB add-on and I'v borrowed some code from mlbviewer that logs in and gets the playback url's. The mlbviewer code uses LWPCookieJar to save cookies, works fine with linux. On windows I get an IOError.
As you can see the same error with _MozillaCookieJar.py.
In the past, when I've had this error, adding 'b' to the mode eg.'wb' would work.
Any ideas, workarounds.
Code:
ERROR: Error Contents: invalid mode: w
ERROR: Traceback (most recent call last):
File "C:\Users\Christopher\AppData\Roaming\XBMC\addons\plugin.video.mlb.highlights\default.py", line 408, in ?
setGameURL(url)
File "C:\Users\Christopher\AppData\Roaming\XBMC\addons\plugin.video.mlb.highlights\default.py", line 109, in setGameURL
url = getGameURL(url)
File "C:\Users\Christopher\AppData\Roaming\XBMC\addons\plugin.video.mlb.highlights\default.py", line 182, in getGameURL
cj.save(COOKIEFILE,ignore_discard=True)
File "special://xbmc/system/python/Lib\_MozillaCookieJar.py", line 117, in save
f = open(filename, "w")
IOError: invalid mode: w
As you can see the same error with _MozillaCookieJar.py.
In the past, when I've had this error, adding 'b' to the mode eg.'wb' would work.
Any ideas, workarounds.