pymysql.err.ProgrammingError: (1146, "Table 'autoplatform.webcasestepinfo' doesn't exist"


在使用jmeter調試接口時,提示pymysql.err.ProgrammingError: (1146, "Table 'autoplatform.webcasestepinfo' doesn't exist"錯誤,顯示在數據時webcasestepinfo表不存在/(ㄒoㄒ)/~~

直接進入數據庫查看,咦,確實沒有這張表,但是看提示我又用了這張表。。。。。。

好吧,可以去代碼中走一圈了。。。

看了N圈后才發現,早之前進行表重命名,但是有些地方沒改過來。。。

原代碼:

cursor = conn.cursor()
    aa = cursor.execute(sql1)
    infos = cursor.fetchmany(aa)
    sql2 = 'select t.id,stepname,findmethod,elementloc,operatemethod, casedata,assertdata,stepresult,' \
           'i.webcase_id from (select s.id, stepname, findmethod,operatemethod,elementdesc, elementloc,' \
           'assertdata from elementinfo e, webcasestepinfo s WHERE e.id=s.element_id)t,' \
           'caseinfo i WHERE t.id = i.casetep_id and i.webcase_id= %s ' % id

修改后:

cursor = conn.cursor()
    aa = cursor.execute(sql1)
    infos = cursor.fetchmany(aa)
    sql2 = 'select t.id,stepname,findmethod,elementloc,operatemethod, casedata,assertdata,stepresult,' \
           'i.webcase_id from (select s.id, stepname, findmethod,operatemethod,elementdesc, elementloc,' \
           'assertdata from elementinfo e, webstepinfo s WHERE e.id=s.element_id)t,' \
           'caseinfo i WHERE t.id = i.casetep_id and i.webcase_id= %s ' % id

 

OK,改完后再次執行jmeter,完美。。。。。。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM