michkaravolos / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

import android on Debian #558

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On Linux 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64 GNU/Linux

Trying : http://code.google.com/p/android-scripting/wiki/RemoteControl 

Getting the below error :

Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import android
>>> d = andriod.Android()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'andriod' is not defined
>>> d = android.Android()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "android.py", line 34, in __init__
    self.conn = socket.create_connection(addr)
  File "/usr/lib/python2.6/socket.py", line 547, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known
>>> 

Original issue reported on code.google.com by hemanth...@gmail.com on 22 Aug 2011 at 11:16

GoogleCodeExporter commented 9 years ago
You need to make sure android.py is in your path.
You can either copy it from your phone, or pick it up from 
http://code.google.com/p/android-scripting/source/browse/python/ase/android.py

Original comment by rjmatthews62 on 22 Aug 2011 at 11:59

GoogleCodeExporter commented 9 years ago
I'm sure it's in the $PATH as import works fine, but bombs on instantiation!

Original comment by hemanth...@gmail.com on 22 Aug 2011 at 12:17

GoogleCodeExporter commented 9 years ago
I had the same issue, due to uninitialized AP_PORT environment variable at 
import time for the android module. Perhaps the error message could have been 
more helpful.

Original comment by n...@blue-edge.bg on 23 Aug 2011 at 3:25