小编Ani*_*tta的帖子

错误:运行 tensorflow 对象检测 api 教程时,模块“tensorflow”没有属性“gfile”错误

我正在尝试使用来自张量流 api 的对象检测教程。我正在使用 python 3 和张量流版本 2。但出现以下错误。我尝试了几种方法:

File "C:\Aniruddhya\object_detection\object_detection\utils\label_map_util.py", line 137, in load_labelmap
    with tf.gfile.GFile(path, 'r') as fid:

AttributeError: module 'tensorflow' has no attribute 'gfile'
Run Code Online (Sandbox Code Playgroud)

有人可以帮我运行这个吗?代码链接:https : //drive.google.com/drive/u/3/folders/1XHpnr5rsENzOOSzoWNTvRqhEbLKXaenL

python-3.x tensorflow

9
推荐指数
2
解决办法
2万
查看次数

TypeError:使用 Python 3.7 时,int() 参数必须是字符串、类似字节的对象或数字,而不是“NoneType”

我正在尝试运行下面的简单代码片段

port = int(os.getenv('PORT'))
print("Starting app on port %d" % port)
Run Code Online (Sandbox Code Playgroud)

我可以理解 PORT 是 s 字符串,但我需要转换为 int。为什么我收到错误

TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Run Code Online (Sandbox Code Playgroud)

python environment-variables getenv python-3.x

6
推荐指数
1
解决办法
9873
查看次数

无法登录到 Google 云平台中托管的 datastax Cassandra 集群中的 cqlsh

我已经在 GCP 中设置了一个 2 节点的 Casandra 集群。

在此处输入图片说明

但问题是我无法访问 cqlsh。我收到 belwo 错误在此处输入图片说明

cassandra cqlsh datastax google-cloud-platform

1
推荐指数
1
解决办法
3577
查看次数