You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Yixing Zhang (Jira)" <ji...@apache.org> on 2020/09/21 21:57:00 UTC
[jira] [Comment Edited] (BEAM-8979) protoc-gen-mypy: program not
found or is not executable
[ https://issues.apache.org/jira/browse/BEAM-8979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17199684#comment-17199684 ]
Yixing Zhang edited comment on BEAM-8979 at 9/21/20, 9:56 PM:
--------------------------------------------------------------
I am also getting similar error after this change by calling the following command.
{code:java}
./gradlew -Prelease=true :sdks:python:sdist -x test -x rat
{code}
{code:java}
> Task :sdks:python:sdist FAILED
INFO:gen_protos:Regenerating Python proto definitions (no output files).
Traceback (most recent call last):
File "setup.py", line 352, in <module>
'mypy': generate_protos_first(mypy),
File "/export/content/data/tmp/py-beam/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/export/apps/python/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/export/apps/python/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/export/apps/python/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/export/content/data/tmp/py-beam/lib/python3.6/site-packages/setuptools/command/sdist.py", line 44, in run
self.run_command('egg_info')
File "/export/apps/python/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/export/apps/python/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 260, in run
gen_protos.generate_proto_files()
File "/home/yixzhang/code/beam_trunk/beam/sdks/python/gen_protos.py", line 317, in generate_proto_files
protoc_gen_mypy = _find_protoc_gen_mypy()
File "/home/yixzhang/code/beam_trunk/beam/sdks/python/gen_protos.py", line 235, in _find_protoc_gen_mypy
(fname, ', '.join(search_paths)))
RuntimeError: Could not find protoc-gen-mypy in
{code}
Any idea? The command would work if I revert this pr: https://github.com/apache/beam/pull/10734
was (Author: yixingzhang):
I am also getting similar error after this change by calling the following command.
{code:java}
./gradlew -Prelease=true :sdks:python:sdist -x test -x rat
{code}
{code:java}
> Task :sdks:python:sdist FAILED
INFO:gen_protos:Regenerating Python proto definitions (no output files).
Traceback (most recent call last):
File "setup.py", line 352, in <module>
'mypy': generate_protos_first(mypy),
File "/export/content/data/tmp/py-beam/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/export/apps/python/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/export/apps/python/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/export/apps/python/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/export/content/data/tmp/py-beam/lib/python3.6/site-packages/setuptools/command/sdist.py", line 44, in run
self.run_command('egg_info')
File "/export/apps/python/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/export/apps/python/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 260, in run
gen_protos.generate_proto_files()
File "/home/yixzhang/code/beam_trunk/beam/sdks/python/gen_protos.py", line 317, in generate_proto_files
protoc_gen_mypy = _find_protoc_gen_mypy()
File "/home/yixzhang/code/beam_trunk/beam/sdks/python/gen_protos.py", line 235, in _find_protoc_gen_mypy
(fname, ', '.join(search_paths)))
RuntimeError: Could not find protoc-gen-mypy in
{code}
Any idea? The command would work if I revert this pr: https://github.com/apache/beam/pull/10400/files
> protoc-gen-mypy: program not found or is not executable
> -------------------------------------------------------
>
> Key: BEAM-8979
> URL: https://issues.apache.org/jira/browse/BEAM-8979
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core, test-failures
> Reporter: Kamil Wasilewski
> Priority: P2
> Fix For: Not applicable
>
> Time Spent: 12h 10m
> Remaining Estimate: 0h
>
> In some tests, `:sdks:python:sdist:` task fails due to problems in finding protoc-gen-mypy. The following tests are affected (there might be more):
> * [https://builds.apache.org/job/beam_LoadTests_Python_37_ParDo_Dataflow_Batch_PR/]
> * [https://builds.apache.org/job/beam_BiqQueryIO_Write_Performance_Test_Python_Batch/ |https://builds.apache.org/job/beam_BiqQueryIO_Write_Performance_Test_Python_Batch/]
> Relevant logs:
> {code:java}
> 10:46:32 > Task :sdks:python:sdist FAILED
> 10:46:32 Requirement already satisfied: mypy-protobuf==1.12 in /home/jenkins/jenkins-slave/workspace/beam_LoadTests_Python_37_ParDo_Dataflow_Batch_PR/src/build/gradleenv/1922375555/lib/python3.7/site-packages (1.12)
> 10:46:32 beam_fn_api.proto: warning: Import google/protobuf/descriptor.proto but not used.
> 10:46:32 beam_fn_api.proto: warning: Import google/protobuf/wrappers.proto but not used.
> 10:46:32 protoc-gen-mypy: program not found or is not executable
> 10:46:32 --mypy_out: protoc-gen-mypy: Plugin failed with status code 1.
> 10:46:32 /home/jenkins/jenkins-slave/workspace/beam_LoadTests_Python_37_ParDo_Dataflow_Batch_PR/src/build/gradleenv/1922375555/lib/python3.7/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '2.19.0.dev' to '2.19.0.dev0'
> 10:46:32 normalized_version,
> 10:46:32 Traceback (most recent call last):
> 10:46:32 File "setup.py", line 295, in <module>
> 10:46:32 'mypy': generate_protos_first(mypy),
> 10:46:32 File "/home/jenkins/jenkins-slave/workspace/beam_LoadTests_Python_37_ParDo_Dataflow_Batch_PR/src/build/gradleenv/1922375555/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
> 10:46:32 return distutils.core.setup(**attrs)
> 10:46:32 File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
> 10:46:32 dist.run_commands()
> 10:46:32 File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
> 10:46:32 self.run_command(cmd)
> 10:46:32 File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
> 10:46:32 cmd_obj.run()
> 10:46:32 File "/home/jenkins/jenkins-slave/workspace/beam_LoadTests_Python_37_ParDo_Dataflow_Batch_PR/src/build/gradleenv/1922375555/lib/python3.7/site-packages/setuptools/command/sdist.py", line 44, in run
> 10:46:32 self.run_command('egg_info')
> 10:46:32 File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
> 10:46:32 self.distribution.run_command(command)
> 10:46:32 File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
> 10:46:32 cmd_obj.run()
> 10:46:32 File "setup.py", line 220, in run
> 10:46:32 gen_protos.generate_proto_files(log=log)
> 10:46:32 File "/home/jenkins/jenkins-slave/workspace/beam_LoadTests_Python_37_ParDo_Dataflow_Batch_PR/src/sdks/python/gen_protos.py", line 144, in generate_proto_files
> 10:46:32 '%s' % ret_code)
> 10:46:32 RuntimeError: Protoc returned non-zero status (see logs for details): 1
> {code}
>
> This is what I have tried so far to resolve this (without being successful):
> * Including _--plugin=protoc-gen-mypy=\{abs_path_to_executable}_ parameter to the _protoc_ call ingen_protos.py:131
> * Appending protoc-gen-mypy's directory to the PATH variable
> I wasn't able to reproduce this error locally.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)