imported module ‘test_room’ has this __file__ attributes which is not the same as the test file we want to collect:

Flaskのプロジェクトでテストを書いていたら、なぜかタイトルのエラーが発生 問題点は各ディレクトリに __init__.py ファイルがないことで、各ディレクトリに追加することで解消できました! こちら参考画像 参考記 …

FastAPIでalembicのautogenerationを適用する方法

とりあえずproject/alembic/env.py の中身 sqlalchemyのmodelを継承して作成したmodelのファイルをimportして設定してあげることが必要なので、下記のようにpathを繋げてあげる。 …

FastAPI/security raise TypeError(“Unicode-objects must be encoded before hashing”)

FastAPIのOAuthのチュートリアルに従いながらコード実装していたところタイトルのエラー発生 とかを試したけど、一向にエラーが治らなかったので、pythonのバージョンを思い切って3.8 -> 3.6.5に落 …