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: symbol not found in flat namespace '_aws_hash_ptr' when trying to load module. #350

Closed
jamesrusso opened this issue Apr 2, 2022 · 4 comments
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@jamesrusso
Copy link

On a fresh installation, I am getting the following import when trying to import mqtt from awscrt: symbol not found in flat namespace '_aws_hash_ptr'

❯ pip install awscrt
Collecting awscrt
  Using cached awscrt-0.13.7-cp39-cp39-macosx_10_9_universal2.whl (600 kB)
Installing collected packages: awscrt
Successfully installed awscrt-0.13.7
❯ python
Python 3.9.11 (main, Apr  2 2022, 11:01:26) 
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from awscrt import mqtt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jamesrusso/.pyenv/versions/3.9.11/lib/python3.9/site-packages/awscrt/mqtt.py", line 9, in <module>
    import _awscrt
ImportError: dlopen(/Users/jamesrusso/.pyenv/versions/3.9.11/lib/python3.9/site-packages/_awscrt.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_aws_hash_ptr'
>>> 
@jamesrusso
Copy link
Author

I've cloned the master and am getting the same results when trying to run unit tests.

test (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test
Traceback (most recent call last):
  File "/Users/jamesrusso/.pyenv/versions/3.9.11/lib/python3.9/unittest/loader.py", line 470, in _find_test_path
    package = self._get_module_from_name(name)
  File "/Users/jamesrusso/.pyenv/versions/3.9.11/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/Users/jamesrusso/test/aws-crt-python/test/__init__.py", line 11, in <module>
    from awscrt._test import check_for_leaks
  File "/Users/jamesrusso/test/aws-crt-python/awscrt/_test.py", line 4, in <module>
    import _awscrt
ImportError: dlopen(/Users/jamesrusso/.pyenv/versions/3.9.11/lib/python3.9/site-packages/_awscrt.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_aws_hash_ptr'


----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)

@jamesrusso
Copy link
Author

Seems to be a dupe of #328

@jmklix
Copy link
Member

jmklix commented Jan 10, 2024

The issue you linked was fixed when m1 support was added. Are you still running into this issue?

@jmklix jmklix added bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. p2 This is a standard priority issue labels Jan 10, 2024
@jamesrusso
Copy link
Author

Yes, haven't run into this issue anymore.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants