mysql - Failed processing pyformat-parameters; %s" % err -


मेरे पास एक स्क्रिप्ट में निम्न क्वेरी है:

  conn = mysql.connector.connect (** config) कनेक्ट = conn.cursor () params = {'build': self.tc.tag, 'पृष्ठ': स्वयं, 'object_id': self.object_id, 'page_header': self.page_header, 'interval' : T.interval, 'टाइमस्टैम्प': टाइमस्टैम्प} query = u'INSERT में page_load_times (बिल्ड, पेज, ऑब्जेक्ट_आईड, पेज_हेडर, एपेटेड_टाइम, डेट_आरन) '\' VALUES (% (build) s,% (पेज) एस,% ( (क्वेरी, पैरामीटर) conn.commit () conn.close ()      P> जब मैं इसे चलाता हूं, तो यह  'पेज' से निम्नलिखित त्रुटि हो रही है: self  पैरामीटर: 

pyformat-parameters;% s " Err) प्रोग्रामिंग त्रुटि: पाइफॉर्मेट-मापदंडों को संसाधित करने में विफल; पायथन 'एपमाइनमेनू' को एक MySQL प्रकार में परिवर्तित नहीं किया जा सकता

स्वयं केवल यूनिकोड स्ट्रिंग लौट रहा है मैंने कनेक्शन के लिए मेरी कॉन्फ़िगर करने के लिए 'charset': 'utf8', 'use_unicode': सच जोड़ा है और इससे भी मदद नहीं मिली है

तो पैरामीटर शब्दकोश में मैं self को यूनिकोड के रूप में डाला करता हूं ताकि अब यह दिखता है जैसे यूनिकोड (स्वयं)

Comments

Popular posts from this blog

Delphi: missing interface declarations for UI Automation methods -

php - how to change mysql_result($res, 0, "url"); to mysqli -

android - How to attach an image from an app to gmail -