Not being able to import AndroidViewClient

522 views Asked by At

I was trying to use the AndroidViewClient in Windows and Linux machine. So I Installed the package via pip:

pip3 install androidviewclient

then I created a simple python script which simply imports the ViewClient like so:

from com.dtmilano.android.viewclient import ViewClient

But when I run the python scripts it is always fails:

>>> from com.dtmilano.android.viewclient import ViewClient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/com/dtmilano/android/viewclient.py", line 399
    raise AttributeError, name

I tried both on Windows (python 3.6) and Linux (python 3.5) with the identical results.

When I instead clone the repository and run their example (e.g. https://github.com/dtmilano/AndroidViewClient/blob/master/examples/dump-simple.py) then it works fine and have no problems with the import. What am I doing wrong?

1

There are 1 answers

1
zambs On

I think I found the answer to my issue. The way to install the python3 version of the AndroidViewclient is the following :

pip3 install --pre androidviewclient --upgrade