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

Import error while trying to run python file #4778

Closed
yippiez opened this issue Jan 9, 2020 · 9 comments
Closed

Import error while trying to run python file #4778

yippiez opened this issue Jan 9, 2020 · 9 comments

Comments

@yippiez
Copy link

yippiez commented Jan 9, 2020

I have been getting this error while trying to run a python script:

ImportError: dlopen failed: cannot locate symbol "getservbyport_r" referenced by "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pycares/_cares.cpython-38.so"...

I have tried to reinstall cpython and pycare but nothing has worked so far.i have been getting missing module/other errors before this but i have fixed all of them.but i couldn't figure this one nor can find any other problem lime this.

Error is from aiodns -> pycare -> cpython

(I have gevent installed which is the only solution to this problem that i found online)

@kcubeterm
Copy link
Member

Maybe this link help you,saghul/pycares#78

@yippiez
Copy link
Author

yippiez commented Jan 10, 2020

Maybe this link help you,saghul/pycares#78

I tried it but still getting the error even though i have commented out getservbyport.

@yippiez
Copy link
Author

yippiez commented Jan 10, 2020

I figured it out pycare has a new config file for android after 3.0.0 so you have to change config_android instead of config_linux.

@lok-esh
Copy link

lok-esh commented Jul 5, 2020

Will you please elaborate it in detail...
I mean how should I change that file and I didn't found any file name config_android or config_linux...
Please help...

@ghost
Copy link

ghost commented Jul 5, 2020

Will you please elaborate it in detail...

Link to upstream issue isn't detail ? saghul/pycares#78

I didn't found any file name config_android or config_linux...

Because didn't searched. File is in pycares source code.


saghul/pycares#78 (comment) well describes what should be done exactly.

@lok-esh
Copy link

lok-esh commented Jul 5, 2020

Thanks but after saving the edited "deps/c-ares/src/config_linux/ares_config.h" file in test it still shows the same error don't know why?

@ghost
Copy link

ghost commented Jul 5, 2020

Have you tried to edit deps/c-ares/src/config_android/ares_config.h instead ?

@yippiez
Copy link
Author

yippiez commented Jul 6, 2020

Have you tried to edit deps/c-ares/src/config_android/ares_config.h instead ?

i changed this file to fix the problem

@lok-esh
Copy link

lok-esh commented Jul 7, 2020

Thanks it worked for me

@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants