ich möchte meinen Code umbrechen damit er besser lesbar ist.
Komme aber nicht so zum Ziel. Wird der Feler durch meine Formatierung erzeugt, oder liegt wirklich ein Fehler im SQL vor.
Wenn ich den Code teste bekomme ich hier immer einen Fehler.
Master - Error adding entry to database: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"INSERT INTO master(
status , vpv1 , vpv2 , p...' at line 1
Code: Alles auswählen
statement = '''"INSERT INTO master(
status , vpv1 , vpv2 , ppv1h , ppv1l ,
buck1curr , buck2curr , op_watth , op_wattl , op_vah ,
op_val , acchr_wtth , acchr_wattl , acchr_vah , acchr_val ,
bat_volt , batterysoc , busvolt , gridvolt , linefreq ,
outputvolt , outputfreq , outputdcv , invtemp , dcdctemp ,
loadpercent , bat_s_volt , bat_dspb_v ,timetotalh , timetotall ,
buck1temp , buck2temp , op_curr ,inv_curr , ac_inwatth ,
ac_inwattl , ac_invah ,ac_inval , faultbit , warnbit ,
faultvalue ,warnvalue , dtc , checkstep , productionlm ,
constpokf , epv1_todayh , epv1_todayl , epv1_totalh , epv1_totall ,
eac_chrtodayh , eac_chrtodayl , eac_chrtotalh , eac_chrtotall , ebat_chrtodayh ,
ebat_chrtodayl , ebat_chrtotalh , ebat_chrtotall , eac_dischrtodayh , eac_dischrtodayl ,
eac_dischrtotalh , eac_dischrtotall , acchrcurr , ac_dischrwatth , ac_dischrwattl ,
ac_dischrvah , ac_dischrval , bat_dischrwatth , bat_dischrwattl , bat_dischrvah ,
bat_dischrval , bat_watth , bat_wattl , uwslavexxistcnt , batovercharge ,
mpptfanspeed , invfanspeed , totalchgcur , eop_dischrtoday_h , eop_dischrtoday_l ,
eop_dischrtotal_h , eop_dischrtotal_l
) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s)"'''