我正在尝试使用来自张量流 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
我正在尝试运行下面的简单代码片段
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)