Skip to main content

python

Openapi python and python3 AMNESIA

If you run this command when run server:

python -m openapi_server

you'll get the error when you'll run the client:

ValueError: Invalid value for `display_name`, must not be `None`

you need run:

python3 -m openapi_server

gRPC

FileNotFoundError: [Errno 2] No such file or directory: 'c++': 'c++'

Resolve:

sudo apt install build-essential

from: github.com

python -m pip install --upgrade pip setuptools wheel

from: packaging.python.org

Installing grpcio

After that, you can successfully install grpcio:

pip install grpcio grpcio-tools

ModuleNotFoundError: No module named 'example_pb2'

Need to be:

example_pb2_grpc.py
from codegen import example_pb2 as example__pb2

ModuleNotFoundError: No module named 'grpc'

Try:

deactivate

If response is:

deactivate: command not found

Then you need run:

source env/bin/activate

see: venv isolated dependencies