0

Is there anything specific that needs to be done to get VS Code's intellisense working for classes auto-generated by the gRPC compiler in Python? I ran the compile command:

python -m grpc_tools.protoc -I../../pb --python_out=. --grpc_python_out=. ../../pb/demo.proto

and then imported the generated class. When I'm trying to access the request object in one of the methods, autocompletion doesn't work and I'm unable to see the properties of the incoming request which makes development very tedious as I keep having to switch back to the proto file to check the names of properties.

faridghar
  • 1,445
  • 2
  • 13
  • 25

1 Answers1

0

You should check your Python Interpreter path. To select a specific environment, use the Python: Select Interpreter command from the Command Palette.

https://code.visualstudio.com/docs/python/environments#_work-with-python-interpreters

Arthur Smirnov
  • 321
  • 3
  • 4
  • confirmed that the Python interpreter is pointing to the correct virtualenv and running ```pip list``` in the virtualenv shows ```grpcio```. – faridghar Jul 11 '22 at 17:48