如何解决“ psycopg2.DataError:整数的无效输入语法:”

时间:2019-05-25 08:16:55

标签: python

我正在尝试根据产品ID返回库存名称。 例如我将亮红色墨水分配给4。亮红色墨水是库存名称,产品ID是4。

def addinginventory_ok_clicked(self):

    inventoryinput = self.inventoryname.combobox.currentText()
    product_id_input = select_product_id(inventoryinput)
    quantityinput = self,quantity_lineedit.text()
    print(inventoryinput, product_id_input, quantityinput)

运行后的错误消息是:

  

psycopg2.DataError:整数:“亮红色墨水”的无效输入语法

我希望根据库存名称返回产品ID的值

0 个答案:

没有答案