简体   繁体   English

使用 Google Cloud 和 Jupyter Lab 时出现“找不到文件”错误

[英]"File was not found" error using Google Cloud and Jupyter Lab

My code:我的代码:

import seaborn as sns
from google.cloud.bigquery.client import Client

import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = "Desktop/Estudos DS/SQL Study/sqlpractice.json"

client = Client()

But even with the path correct, the json key correct, I keep getting the following message但即使路径正确,json 密钥正确,我仍然收到以下消息

DefaultCredentialsError: File Desktop/Estudos DS/SQL Study/sqlpractice.json was not found.

Can someone please help?有人可以帮忙吗?

If you use GOOGLE_APPLICATION_CREDENTIALS from local path right?如果您使用本地路径中的GOOGLE_APPLICATION_CREDENTIALS对吗? If it right you need to move your credential into Colab.如果正确,您需要将您的凭证移至 Colab。 Colab its doesn't known your local path. Colab 它不知道您的本地路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Jupyter Notebook/Lab 将当前目录设置为 ipynb 文件的 - Jupyter Notebook/Lab set current directory to ipynb file's 将文件上传到谷歌云存储时出错 - Error uploading file to google cloud storage 在谷歌云中运行 Apache Beam 作业时找不到错误模块 - Error module not found while running Apache beam job in google cloud 谷歌云 SDk:找不到 Python - Google Cloud SDk: Python was not found Google Cloud CloudSQL 实例无法使用 Terraform 提供程序创建,并出现错误“未找到每产品每项目服务帐户” - Google Cloud CloudSQL Instance Fails To Create using Terraform Provider With Error "Per-Product Per-Project Service Account is not found" 如何在angular中使用谷歌云存储的签名URL下载文件 - How to download a file using the signed URL of google cloud storage in angular Google Cloud Storage - 使用 CURL 请求下载文件 - Google Cloud Storage - Downloading a file using CURL request 在 Google Cloud Build 中使用 gcloud compute scp 时出错 - Error using gcloud compute scp with Google Cloud Build 找不到资源(资源=<my-subscription-id> ) 在谷歌云平台创建订阅时出错</my-subscription-id> - Resource not found (resource=<my-subscription-id>) error when creating subscription in Google cloud platform 谷歌云 - 文件 pipe - Google cloud - file pipe
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM