Skip to content

Error: "No module named 'markupsafe'" from py_gapic_library rule  #361

@aohren

Description

@aohren

I'm experimenting with the new py_gapic_library rule and get the following error about missing markupsafe module. Do we need it added to requirements.txt?

Traceback (most recent call last):
  File "/usr/local/google/home/aohren/.cache/bazel/_bazel_aohren/585702ed92d2b12f1b55b0ec700de995/sandbox/linux-sandbox/298/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/cli/generate.py", line 23, in <module>
    from gapic import generator
  File "/usr/local/google/home/aohren/.cache/bazel/_bazel_aohren/585702ed92d2b12f1b55b0ec700de995/sandbox/linux-sandbox/298/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/generator/__init__.py", line 21, in <module>
    from .generator import Generator
  File "/usr/local/google/home/aohren/.cache/bazel/_bazel_aohren/585702ed92d2b12f1b55b0ec700de995/sandbox/linux-sandbox/298/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/generator/generator.py", line 15, in <module>
    import jinja2
  File "/usr/local/google/home/aohren/.cache/bazel/_bazel_aohren/585702ed92d2b12f1b55b0ec700de995/sandbox/linux-sandbox/298/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python_pip_deps_pypi__Jinja2_2_11_1/jinja2/__init__.py", line 6, in <module>
    from markupsafe import escape
ModuleNotFoundError: No module named 'markupsafe'
--python_gapic_out: protoc-gen-python_gapic: Plugin failed with status code 1.
Target //google/ads/googleads/v3:googleads_v3_py_gapic failed to build
Use --verbose_failures to see the command lines of failed build steps.

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions