0

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?

zambs
  • 21
  • 8
  • Actually I noticed that the /usr/local/lib/python3.5/dist-packages/com/dtmilano/android/viewclient.py installed via "pip3 install androidviewclient" has a python2 format vs the version available from github, which is fully converted into python3. Any ideas why pip install an old version? – zambs Jan 29 '21 at 13:01

1 Answers1

1

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 
zambs
  • 21
  • 8
  • 1
    Correct. There's an example of the installation [here](https://github.com/dtmilano/AndroidViewClient/wiki#python-3). The 20.x version will became a release soon (replacing the previous one). – Diego Torres Milano Jan 29 '21 at 17:17