I get errors with mysql libraries !
I get this error :
Code:
17:41:04 T:2586831680 DEBUG: Python thread: start processing
17:41:04 T:2586831680 NOTICE: -->Python Interpreter Initialized<--
17:41:04 T:2586831680 DEBUG: Process - The source file to load is /home/payam/.xbmc/addons/script.ratingupdate/resources/lib/ratings_all.py
17:41:04 T:2586831680 DEBUG: Process - Setting the Python path to /home/payam/.xbmc/addons/script.ratingupdate/resources/lib:/home/payam/.xbmc/addons/script.module.xbmcswift/lib:/home/payam/.xbmc/addons/script.module.simplejson/lib:/home/payam/.xbmc/addons/script.module.myconnpy/lib:/home/payam/.xbmc/addons/script.module.beautifulsoup/lib:/usr/share/xbmc/addons/script.module.pil/lib:/home/payam/.xbmc/addons/script.common.plugin.cache/lib:/home/payam/.xbmc/addons/script.module.simple.downloader/lib:/home/payam/.xbmc/addons/script.module.parsedom/lib:/home/payam/.xbmc/addons/script.module.elementtree/lib:/usr/share/xbmc/addons/script.module.pysqlite/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PIL:/usr/lib/python2.7/dist-packages/gst-0.10:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7:/usr/lib/python2.7/dist-packages/ubuntu-sso-client:/usr/lib/python2.7/dist-packages/ubuntuone-client:/usr/lib/python2.7/dist-packages/ubuntuone-control-panel:/usr/lib/python2.7/dist-packages/ubuntuone-couch:/usr/lib/python2.7/dist-packages/ubuntuone-installer:/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol:/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode:
17:41:04 T:2586831680 DEBUG: Process - Entering source directory /home/payam/.xbmc/addons/script.ratingupdate/resources/lib
17:41:04 T:3014674176 DEBUG: ------ Window Init (/home/payam/.xbmc/addons/script.ratingupdate/resources/skins/Default/720p/script_rating_update-main.xml) ------
17:41:04 T:3014674176 INFO: Loading skin file: /home/payam/.xbmc/addons/script.ratingupdate/resources/skins/Default/720p/script_rating_update-main.xml
17:41:05 T:3014674176 DEBUG: SDLKeyboard: scancode: 6f, sym: 0111, unicode: 0000, modifier: 1000
17:41:05 T:3014674176 DEBUG: OnKey: up (f080) pressed, action is Up
17:41:06 T:3014674176 DEBUG: SDLKeyboard: scancode: 6f, sym: 0111, unicode: 0000, modifier: 1000
17:41:06 T:3014674176 DEBUG: OnKey: up (f080) pressed, action is Up
17:41:06 T:3014674176 DEBUG: SDLKeyboard: scancode: 6f, sym: 0111, unicode: 0000, modifier: 1000
17:41:06 T:3014674176 DEBUG: OnKey: up (f080) pressed, action is Up
17:41:06 T:3014674176 DEBUG: SDLKeyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 1000
17:41:06 T:3014674176 DEBUG: OnKey: return (f00d) pressed, action is Select
17:41:06 T:3014674176 DEBUG: ------ Window Deinit (/home/payam/.xbmc/addons/script.ratingupdate/resources/skins/Default/720p/script_rating_update-main.xml) ------
17:41:07 T:2586831680 INFO: Loading skin file: DialogYesNo.xml
17:41:07 T:3014674176 DEBUG: ------ Window Init (DialogYesNo.xml) ------
17:41:08 T:3014674176 DEBUG: SDLKeyboard: scancode: 71, sym: 0114, unicode: 0000, modifier: 1000
17:41:08 T:3014674176 DEBUG: OnKey: left (f082) pressed, action is Left
17:41:08 T:3014674176 DEBUG: SDLKeyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 1000
17:41:08 T:3014674176 DEBUG: OnKey: return (f00d) pressed, action is Select
17:41:08 T:3014674176 DEBUG: ------ Window Deinit (DialogYesNo.xml) ------
17:41:08 T:2586831680 ERROR: Exception in python script callback execution
17:41:08 T:2586831680 ERROR: Traceback (most recent call last):
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/gui.py", line 73, in onClick
17:41:08 T:2586831680 ERROR: Movies()
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/ratings_all.py", line 271, in __init__
17:41:08 T:2586831680 ERROR: self.Movies = self.listing()
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/ratings_all.py", line 298, in listing
17:41:08 T:2586831680 ERROR: match = RawXbmcDb.query( 'SELECT idMovie FROM movie' )
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/dbutils.py", line 16, in query
17:41:08 T:2586831680 ERROR: if RawXbmcDb_Connect is None: RawXbmcDb_Connect = findXbmcDb()
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/dbutils.py", line 67, in findXbmcDb
17:41:08 T:2586831680 ERROR: return mysql.connector.Connect( host = host, port = port, database = name, user = user, password = pswd )
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.module.myconnpy/lib/mysql/connector/__init__.py", line 45, in Connect
17:41:08 T:2586831680 ERROR: return MySQLConnection(*args, **kwargs)
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.module.myconnpy/lib/mysql/connector/connection.py", line 366, in __init__
17:41:08 T:2586831680 ERROR: self.connect(*args, **kwargs)
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.module.myconnpy/lib/mysql/connector/connection.py", line 411, in connect
17:41:08 T:2586831680 ERROR: ssl=(ssl_ca, ssl_cert, ssl_key))
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.module.myconnpy/lib/mysql/connector/connection.py", line 441, in _open_connection
17:41:08 T:2586831680 ERROR: self.protocol.do_handshake()
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.module.myconnpy/lib/mysql/connector/protocol.py", line 326, in do_handshake
17:41:08 T:2586831680 ERROR: self.conn.open_connection()
17:41:08 T:2586831680 ERROR: File "/home/payam/.xbmc/addons/script.module.myconnpy/lib/mysql/connector/connection.py", line 327, in open_connection
17:41:08 T:2586831680 ERROR: raise errors.InterfaceError('%s' % e)
17:41:08 T:2586831680 ERROR: mysql.connector.errors
17:41:08 T:2586831680 ERROR: .
17:41:08 T:2586831680 ERROR: InterfaceError
17:41:08 T:2586831680 ERROR: :
17:41:08 T:2586831680 ERROR: an integer is required
then I changed /home/payam/.xbmc/addons/script.ratingupdate/resources/lib/dbutils.py and add this to it :
Code:
def findXbmcDb():
type = mysql
host = payam-ubuntu
port = 3306
name = None
user = xbmc
pswd = xbmc
and now I get this error :
Code:
17:47:34 T:3014674176 DEBUG: ------ Window Deinit (DialogYesNo.xml) ------
17:47:34 T:2758785856 ERROR: Exception in python script callback execution
17:47:34 T:2758785856 ERROR: Traceback (most recent call last):
17:47:34 T:2758785856 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/gui.py", line 73, in onClick
17:47:34 T:2758785856 ERROR: Movies()
17:47:34 T:2758785856 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/ratings_all.py", line 271, in __init__
17:47:34 T:2758785856 ERROR: self.Movies = self.listing()
17:47:34 T:2758785856 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/ratings_all.py", line 298, in listing
17:47:34 T:2758785856 ERROR: match = RawXbmcDb.query( 'SELECT idMovie FROM movie' )
17:47:34 T:2758785856 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/dbutils.py", line 16, in query
17:47:34 T:2758785856 ERROR: if RawXbmcDb_Connect is None: RawXbmcDb_Connect = findXbmcDb()
17:47:34 T:2758785856 ERROR: File "/home/payam/.xbmc/addons/script.ratingupdate/resources/lib/dbutils.py", line 31, in findXbmcDb
17:47:34 T:2758785856 ERROR: type = mysql
17:47:34 T:2758785856 ERROR: UnboundLocalError
17:47:34 T:2758785856 ERROR: :
17:47:34 T:2758785856 ERROR: local variable 'mysql' referenced before assignment
any idea where is the problem ?