万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    「動かして学ぶ!Pythonサーバレスアプリ開発入門」 サンプルコード

    P150で SESSION_TYPE = dynamodbコメントアウトしないとき

    python manage.py init_db                                                     
    Traceback (most recent call last):
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/base.py", line 548, in get_meta_table
        data = self.dispatch(DESCRIBE_TABLE, operation_kwargs)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/base.py", line 329, in dispatch
        data = self._make_api_call(operation_name, operation_kwargs, settings)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/base.py", line 378, in _make_api_call
        prepared_request = self._create_prepared_request(request_dict, settings)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/base.py", line 306, in _create_prepared_request
        self._sign_request(request)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/base.py", line 298, in _sign_request
        auth.add_auth(request)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/botocore/auth.py", line 373, in add_auth
        raise NoCredentialsError()
    botocore.exceptions.NoCredentialsError: Unable to locate credentials
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "manage.py", line 9, in <module>
        manager.run()
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/flask_script/__init__.py", line 417, in run
        result = self.handle(argv[0], argv[1:])
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/flask_script/__init__.py", line 386, in handle
        res = handle(*args, **config)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/flask_script/commands.py", line 216, in __call__
        return self.run(*args, **kwargs)
      File "/Users/shinriyo/development/python_apps/application/flask_blog/scripts/db.py", line 9, in run
        if not Entry.exists():
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/models.py", line 753, in exists
        cls._get_connection().describe_table()
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/table.py", line 290, in describe_table
        return self.connection.describe_table(self.table_name)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/base.py", line 748, in describe_table
        tbl = self.get_meta_table(table_name, refresh=True)
      File "/Users/shinriyo/.local/share/virtualenvs/application-jAa1F8aU/lib/python3.8/site-packages/pynamodb/connection/base.py", line 551, in get_meta_table
        raise TableError("Unable to describe table: {}".format(e), e)
    pynamodb.exceptions.TableError: Unable to describe table: Unable to locate credentials