Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-9508

Python installation fails if grpc_tools is not installed

Details

    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • None
    • None
    • sdk-py-core
    • None

    Description

      When installing from master branch, I'm getting an exception below. Looks like the ImportError exception handling throws an exception itself. I'll manually install grpc_tools and try again but the handling of ImportError has issues.
       
      ```
      Traceback (most recent call last):
            File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 292, in generate_proto_files
              from grpc_tools import protoc
          ModuleNotFoundError: No module named 'grpc_tools'
          
          During handling of the above exception, another exception occurred:
          
          Traceback (most recent call last):
            File "/opt/conda/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
              self.run()
            File "/opt/conda/lib/python3.7/multiprocessing/process.py", line 99, in run
              self._target(self._args, *self._kwargs)
            File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 378, in _install_grpcio_tools_and_generate_proto_files
              generate_proto_files(force=force)
            File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 315, in generate_proto_files
              protoc_gen_mypy = _find_protoc_gen_mypy()
            File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 233, in _find_protoc_gen_mypy
              (fname, ', '.join(search_paths)))
          RuntimeError: Could not find protoc-gen-mypy in /root/apache-beam-custom/bin, /root/apache-beam-custom/bin, /usr/local/bin, /opt/conda/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin
      ```

      Attachments

        Activity

          People

            Unassigned Unassigned
            davidyan David Yan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: