8000 _scproxy import error when building on Mac with 'requests' lib · Issue #186 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content
_scproxy import error when building on Mac with 'requests' lib #186
Closed
@dustinfarris

Description

@dustinfarris

Building on a Mac while requiring the 'requests' Python library causes an import error on Android.

Excerpt from logcat:

I/python  ( 5771):  Traceback (most recent call last):
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/main.py", line 7, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/edtitan/connection.py", line 1, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/_applibs/requests/__init__.py", line 58, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/app/_applibs/requests/utils.py", line 12, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/platform/python-for-android/dist/default/private/lib/python2.7/cgi.py", line 40, in <module>
I/python  ( 5771):    File "/Users/dustin/Code/edtitan-client/.buildozer/android/platform/python-for-android/dist/default/private/lib/python2.7/urllib.py", line 1360, in <module>
I/python  ( 5771):  ImportError: No module named _scproxy
I/python  ( 5771): Python for android ended.

This is seems to be related to the fact that _scproxy is a Mac-specific Python library. The error can be worked around by adding the following to the top of main.py:

import sys
sys.platform = 'linux2'

/cc @akshayaurora

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0