[英]Provided Schema does not match table
I have a script that I am running successfully in a local machine (PyCharm).我有一个在本地机器 (PyCharm) 上成功运行的脚本。 But when I am adding script to the VM, it is throwing me the error of:
但是当我向虚拟机添加脚本时,它抛出了以下错误:
Bad request. The provided schema does not match to the table schema. STRING changed to BYTES.
Does anyone know why it should happen?有谁知道为什么会发生? I mean, locally everything is working perfect, this issue is popping up when I want to run the file from VM.
我的意思是,本地一切正常,当我想从 VM 运行文件时会出现这个问题。
I am using BigQuery.我正在使用 BigQuery。
I was not sure why it was happening in VM and not local.我不确定为什么它发生在 VM 而不是本地。 But just added 2 lines of code to solve it.
但是只是添加了2行代码来解决它。
if isinstance(register_date, bytes):
register_date = str(register_date).decode("utf-8")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.