flyteorg / flyteorg/flyte

[BUG] [flytekit] pyflyte register FileOptions has no attribute RegisterExtension

Open
#6,578 2 comments 1 reaction 0 assignees View on GitHub
bug untriaged
Dominant language
Go
Stars
7.5k
Forks
886
Avg merge
1d 14h
Merged PRs (30d)
120

Description

### Flyte & Flytekit version

Python deps:

```
flytekit 1.16.1
flyteidl 1.16.0
protobuf 5.29.5
```

### Describe the bug

```
pyflyte --version

Traceback (most recent call last):
File ".venv/bin/pyflyte", line 4, in
from flytekit.clis.sdk_in_container.pyflyte import main
File ".venv/lib/python3.12/site-packages/flytekit/__init__.py", line 154, in
from flytekit.remote import FlyteRemote
File ".venv/lib/python3.12/site-packages/flytekit/remote/__init__.py", line 58, in
from flytekit.remote.remote import FlyteRemote
File "venv/lib/python3.12/site-packages/flytekit/remote/remote.py", line 37, in
from flytekit.clients.friendly import SynchronousFlyteClient
File ".venv/lib/python3.12/site-packages/flytekit/clients/friendly.py", line 18, in
from flyteidl.service import dataproxy_pb2 as _data_proxy_pb2
File ".venv/lib/python3.12/site-packages/flyteidl/service/dataproxy_pb2.py", line 15, in
from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2
File ".venv/lib/python3.12/site-packages/protoc_gen_openapiv2/options/annotations_pb2.py", line 23, in
google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(openapiv2_swagger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'FileOptions' has no attribute 'RegisterExtension'
```

Interestingly this only happens on my x86 Linux machine and not my arm64 Mac.

I'm not sure if there's a linking / version issue here with protobuf.

### Expected behavior

Can run `pyflyte` binary installed in venv.

### Additional context to reproduce

_No response_

### Screenshots

_No response_

### Are you sure this issue hasn't been raised already?

- [x] Yes

### Have you read the Code of Conduct?

- [x] Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with flytekit 1.16.1, flyteidl 1.16.0, and protobuf 5.29.5 by running pyflyte --version on x86 Linux. Trace the import path through flytekit/remote/remote.py, flyteidl/service/dataproxy_pb2.py, and protoc_gen_openapiv2/options/annotations_pb2.py. Done means the installed pyflyte command starts without the FileOptions.RegisterExtension error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.