Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with dependancy protobuf #139

Closed
zach-morris opened this issue May 27, 2022 · 1 comment
Closed

Error with dependancy protobuf #139

zach-morris opened this issue May 27, 2022 · 1 comment

Comments

@zach-morris
Copy link

I recieve the following error on import of the library using:

import dash_leaflet.express as dlx

With the latest version of protobuf also installed (4.21.0 released May 25, 2022)

The error I receive is:

File   "...my_page.py", line 10, in <module>
import dash_leaflet.express as dlx
File   "/home/.../python3.10/site-packages/dash_leaflet/express.py",   line 1, in <module>
import geobuf
File   "/home/.../python3.10/site-packages/geobuf/__init__.py",   line 1, in <module>
from .encode import Encoder
File   "/home/.../python3.10/site-packages/geobuf/encode.py",   line 9, in <module>
from . import geobuf_pb2
File   "/home/.../python3.10/site-packages/geobuf/geobuf_pb2.py",   line 33, in <module>
_descriptor.EnumValueDescriptor(
File   "/home/.../python3.10/site-packages/google/protobuf/descriptor.py",   line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created   directly.
If   this call came from a _pb2.py file, your generated code is out of date and   must be regenerated with protoc >= 3.19.0.
If   you cannot immediately regenerate your protos, some other possible   workarounds are:
1.   Downgrade the protobuf package to 3.20.x or lower.
2.   Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use   pure-Python parsing and will be much slower).
More information:   https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

I can confirm the error goes away when downgrading to protobuf 3.20.1

@zach-morris zach-morris changed the title Error with dependancy Error with dependancy protobuf May 27, 2022
@emilhe
Copy link
Owner

emilhe commented Jul 20, 2022

I have added a strict version spec to requirement.txt

@emilhe emilhe closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants