pythonのエラー修正 Google Colaboratoryでコードを実行したところ以下のようなエラー文が出ました エラー文 AttributeError Traceback (most recent call last) <ipython-input-4-7dabcc49c06d> in <module> 87 gen_yourfile_main('yourfile', 'gen_yourfile', outputs_dir + '/gen_yourfile.zip') 88 else: ---> 89 gen_yourfile_main('yourfile', 'gen_yourfile', outputs_dir + '/gen_yourfile.zip', cut_loop_length=1, reverse_flag=False) 90 else: 91 with zipfile.ZipFile(outputs_dir + '/gen_yourfile.zip') as existing_zip: 1 frames /usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/saving.py in load_model(filepath, custom_objects, compile) 231 if model_config is None: 232 raise ValueError('No model found in config file.') --> 233 model_config = json.loads(model_config.decode('utf-8')) 234 model = model_from_config(model_config, custom_objects=custom_objects) 235 AttributeError: 'str' object has no attribute 'decode' どのように修正すれば正常に動作するようになるでしょうか? 以下はエラーが出た場所のコードです if not os.path.isfile(outputs_dir + '/gen_yourfile.zip'): from scripts.gen_yourfile import gen_yourfile_main if increase_flag: gen_yourfile_main('yourfile', 'gen_yourfile', outputs_dir + '/gen_yourfile.zip') else: gen_yourfile_main('yourfile', 'gen_yourfile', outputs_dir + '/gen_yourfile.zip', cut_loop_length=1, reverse_flag=False) else: with zipfile.ZipFile(outputs_dir + '/gen_yourfile.zip') as existing_zip: existing_zip.extractall('gen_yourfile')
プログラミング