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

OSError: getsockaddrarg: bad family #2

Open
x011 opened this issue Feb 12, 2020 · 3 comments
Open

OSError: getsockaddrarg: bad family #2

x011 opened this issue Feb 12, 2020 · 3 comments

Comments

@x011
Copy link

x011 commented Feb 12, 2020

I cannot run any script:

/data/user/0/org.qpython.qpy3/files/bin/qpython3-android5-root.sh  /storage/emulated/0/qpython/scripts3/.last_tmp.py  && exit
/system/bin/sh: /system/etc/mkshrc[23]: export: /sdcard/.aliases: is not an identifier
ts3/.last_tmp.py  && exit           <
Traceback (most recent call last):
  File "/storage/emulated/0/qpython/scripts3/.last_tmp.py", line 2, in <module>
    droid = Android()
  File "/data/user/0/org.qpython.qpy3/files/lib/python3.6/qpyutil.zip/androidhelper/sl4a.py", line 34, in __init__
  File "/data/user/0/org.qpython.qpy3/files/lib/python36.zip/socket.py", line 724, in create_connection
  File "/data/user/0/org.qpython.qpy3/files/lib/python36.zip/socket.py", line 713, in create_connection
OSError: getsockaddrarg: bad family
1|HWCOL:/ $
@riverfor
Copy link
Member

Thanks for feedback, can you share your code please ?
@x011

@UmbrellaC0rp
Copy link

I have just installed qpython and if I try and run any of the default scripts, such as hello_world.py, I also get this "bad family" error.

/data/user/0/org.qpython.qpy3/files/bin/qpython3-android5-root.sh /storage/emulated/0/qpython/scripts3/.last_tmp.py && exit rage/emulated/0/qpython/scripts3/.last_tmp.py && exit < Traceback (most recent call last): File "/storage/emulated/0/qpython/scripts3/.last_tmp.py", line 2, in <module> droid = androidhelper.Android() File "/data/user/0/org.qpython.qpy3/files/lib/python3.6/qpyutil.zip/androidhelper/sl4a.py", line 34, in __init__ File "/data/user/0/org.qpython.qpy3/files/lib/python36.zip/socket.py", line 724, in create_connection File "/data/user/0/org.qpython.qpy3/files/lib/python36.zip/socket.py", line 713, in create_connection OSError: getsockaddrarg: bad family 1|:/ $

@yoshinrt
Copy link

When I ran the default test.py, I had the same problem.
After investigating, it seems that IPv6 is disabled in the python build.

>>> import socket
>>> print(socket.has_ipv6)
False
>>> import os
>>> print(os.environ.get('AP_HOST'))
::1

Please refer:
majek/puka#27

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

4 participants