Search code examples
pythonandroidviewclient

Setting up AndroidViewClient on Windows 8 gives Raise AttributeError


I have downloaded the .zip from https://github.com/dtmilano/AndroidViewClient which is version 5.1.1 . I have added ANDROID_VIEW_CLIENT_HOME=/path/to/AndroidViewClient and PYTHONPATH=/path/to/AndroidViewClient/src .

Now when i run python test-connect-to-device.py , I am getting raise AttributeError

enter image description here


Solution

  • You appear to using Python 3 to run code that will only work in Python 2. You will have to install Python 2 and run your script using Python 2 to get around this.

    For example, the code

    name = "blah"
    raise AttributeError, name
    

    runs and raises an AttributeError on Python 2 but raises a SyntaxError and fails to compile on Python 3.