plugin.video.iptv.recorder icon indicating copy to clipboard operation
plugin.video.iptv.recorder copied to clipboard

OperationalError: no such column: tvg_name

Open dufourgilles opened this issue 5 years ago • 2 comments

Crash when trying to record a channel

2020-12-27 20:45:59.078 T:123145343946752 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'sqlite3.OperationalError'> Error Contents: no such column: tvg_name Traceback (most recent call last): File "/Users/gdufour/Library/Application Support/Kodi/addons/plugin.video.iptv.recorder/main.py", line 3484, in plugin.run() File "/Users/gdufour/Library/Application Support/Kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 342, in run items = self._dispatch(self.request.path) File "/Users/gdufour/Library/Application Support/Kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 316, in _dispatch listitems = view_func(**items) File "/Users/gdufour/Library/Application Support/Kodi/addons/plugin.video.iptv.recorder/main.py", line 1448, in broadcast channel = cursor.execute("SELECT * FROM channels WHERE tvg_name=?", (channelname, )).fetchone() OperationalError: no such column: tvg_name -->End of Python script error report<-- 2020-12-27 20:45:59.110 T:123145342337024 ERROR: GetDirectory - Error getting plugin://plugin.video.iptv.recorder/broadcast/11114/%7CFR%7C+TV++FAMILY+HD

Indeed the schema does not match the code

sqlite> .schema channels CREATE TABLE channels(uid INTEGER PRIMARY KEY ASC, id TEXT, name TEXT, icon TEXT); sqlite>

channel = cursor.execute("SELECT * FROM streams WHERE name=?", (channelname,)).fetchone()
if not channel:
    channel = cursor.execute("SELECT * FROM channels WHERE tvg_name=?", (channelname, )).fetchone()
    uid, tvg_id, name, tvg_logo = channel
    url = ""
else:
    uid,

dufourgilles avatar Dec 27 '20 19:12 dufourgilles

Encountered the same problem on Windows 10:

ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'sqlite3.OperationalError'> Error Contents: no such column: tvg_name Traceback (most recent call last): File "C:\Users\pcadmin\AppData\Roaming\Kodi\addons\plugin.video.iptv.recorder\main.py", line 3434, in <module> plugin.run() File "C:\Users\pcadmin\AppData\Roaming\Kodi\addons\script.module.xbmcswift2\lib\xbmcswift2\plugin.py", line 338, in run items = self._dispatch(self.request.path) File "C:\Users\pcadmin\AppData\Roaming\Kodi\addons\script.module.xbmcswift2\lib\xbmcswift2\plugin.py", line 312, in _dispatch listitems = view_func(**items) File "C:\Users\pcadmin\AppData\Roaming\Kodi\addons\plugin.video.iptv.recorder\main.py", line 1465, in broadcast channel = cursor.execute("SELECT * FROM channels WHERE tvg_name=?", (channelname, )).fetchone() sqlite3.OperationalError: no such column: tvg_name -->End of Python script error report<--

Martin-Stangl avatar Jul 22 '22 15:07 Martin-Stangl

I just found more details on the issue and a workaround posted by carloss at 2021-02-23, 19:26 on the Kodi forum: https://forum.kodi.tv/archive/index.php?thread-329991-83.html:

Martin-Stangl avatar Jul 22 '22 16:07 Martin-Stangl