-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
ImportError: symbol not found in flat namespace (protobuf 3.20.2) #10571
Comments
Also getting this error (still on macOS 12.6, Python 3.10.6) |
+1 here, macOS 12.6, Python 3.10.6, protobuf==3.20.2 and Mac M1 |
Same: macOS 12.6, Python 3.10.6, protobuf==3.20.2 and Mac M1. For me, I am not using even using Protobuf, but one of the dependencies imports it on a startup and this side effect causes the codebase no longer run:
|
Confirming downgrade works:
|
Had this same issue pop up while installing lstein/stable-diffusion and downgrading solved it as well. Thanks!
|
3.19.5 also suffers from the same issue. Downgrading to 3.19.4 works. |
in my case |
1 similar comment
in my case |
Confirmed fix, thanks! Came here trying to install stable diffuser. |
Issue also doesn't happen on python 3.9! |
Running "pip install protobuf==3.19.4" to downgrade also worked for me. |
- add url init images - don't install protobuf versions that are causing problems #7 protocolbuffers/protobuf#10571
+1 here, macOS 11.2, Python 3.10.7, protobuf==3.20.2 and Mac M1 |
I used to have troubles with protobuf==3.20.2 (ImportError cause by some symbols) right after |
I do experience the same problem with Python version 3.8.13 using poetry. Perhaps it's related to this issue. I have found that EDIT: |
It appears that the same bug was introduced in parallel in 3.19.5 and 3.20.2, most likely as a result of backporting some bug fix to the earlier minor revision. |
Sorry about this issue. The problem is that the 3.19 and 3.20 branches only used the pure python implementation of protobuf. The newest update has added an incomplete C++ implementation for M1 binaries which has caused the crash. To work around, you can set the environment variable PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python. We are working on a fix now, but in order to get the most efficient python implementation we would recommend you upgrade to protobuf 4.21.7. |
I believe this issue should be fixed for 3.19.5, 3.19.6, 3.20.2, and 3.20.3. Please let me know if you are still experiencing issues. The fix will force python 3.10 osx users to use pure python. If performance is important to you, we highly recommend you upgrade to 4.21.7. |
I confirm the issue is fixed for 3.19.5, 3.19.6, 3.20.2, and 3.20.3 on Python 3.10.6, macOS 12.6, M1 Pro processor. 😄 Thank you! |
- Start from ``3.10.2`` since a security vulnerability was fixed there: GHSA-8gq9-2x98-w8hf - Discussion here: protocolbuffers/protobuf#10571
- Start from ``3.20.2`` since a security vulnerability was fixed there: GHSA-8gq9-2x98-w8hf - Discussion here: protocolbuffers/protobuf#10571
No it's not. $ python --version
Python 3.10.3
$ python -c "import google.protobuf; print(google.protobuf.__version__)"
3.20.3
$ python -c "import google.protobuf.descriptor"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/nmariz/tmp/venv/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 47, in <module>
from google.protobuf.pyext import _message
ImportError: dlopen(/Users/nmariz/tmp/venv/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace (__ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_) And upgrading to 4.21.7 is not a workable solution, since the stubs are incompatible with 3.x. As well as the environment variable, specially for libraries that use Protobuf. I don't get it why the bug is closed and not fixed. Basically all macOS users will have to use a release with a known security issue (in the 3.20 series). |
@nmariz, somehow the import works perfectly on my Mac with Python 3.10.6 and Protobuf 3.20.3. Very weird. 🤔 |
Sorry you're still seeing this issue, I thought it was resolved. I was able to reproduce with the steps in the original bug and after my change the error went away. When you use those steps are you still seeing the error? Can you provide reproduction steps that include installing protobuf? Have you uninstalled/reinstalled? |
Thanks for considering my comment, but please ignore it. |
* update to get list of tasks from parameters * upgrade protobuf protocolbuffers/protobuf#10571 * remove write_parameters_file. We are using metadata * remove json * update launch for testing * update flat payment parameters * update generic rule * add pydash * update main run * update payment tree to add column * update flat payment * get scheduler to flatten explanation block into parameters * rename run_reward_program to run_task * clean * fix to have default for explanation_data_arr * fix rollover test * fix safe ownership test * fix retro airdrop test * fix staking test * fix flat payment test * fix add metadata test * remove unused import lint * update input parameters * update staking * remove explanation_id argument from as_arrow * make explanationData part of payment * remove explanation id and explanation block from rule
* update to get list of tasks from parameters * upgrade protobuf protocolbuffers/protobuf#10571 * remove write_parameters_file. We are using metadata * remove json * update launch for testing * update flat payment parameters * update generic rule * add pydash * update main run * update payment tree to add column * update flat payment * get scheduler to flatten explanation block into parameters * rename run_reward_program to run_task * clean * fix to have default for explanation_data_arr * fix rollover test * fix safe ownership test * fix retro airdrop test * fix staking test * fix flat payment test * fix add metadata test * remove unused import lint * update input parameters * update staking * remove explanation_id argument from as_arrow * make explanationData part of payment * remove explanation id and explanation block from rule * update generic rule * add rollover_amount to explanation * fix rollover test * remove group_by import * add explanation for staking * fix black * fix staking rule * fix merge * remove group_by function * Update indexer and api to use explanation (#3352) * update generic rule * update idnexer * update flat_drop script * update api * add laucnh files for debugging * update flat payment params * fix * remove setuptools * just trigger * update parquet files for test * update staking params * add deafaults for files with no explanationId or explanationData * fix reward api project toml * add name and version fro indexer * fix merge * remove itertools import
Hello!
|
I solved downgrading Python to
|
- add url init images - don't install protobuf versions that are causing problems brycedrennan/imaginAIry#7 protocolbuffers/protobuf#10571
- add url init images - don't install protobuf versions that are causing problems brycedrennan/imaginAIry#7 protocolbuffers/protobuf#10571
What version of protobuf and what language are you using?
Python,
protobuf==3.20.2
What operating system (Linux, Windows, ...) and version?
macOS 12.6
What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.10.6
What did you do?
What did you expect to see
Nothing (a successful import)
What did you see instead?
FYI a similar error is happening inside Google's
google-cloud-bigquery
library.Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
protobuf==3.20.1
.The text was updated successfully, but these errors were encountered: