Able to connect ADB to bluestacks, but not ppadb to bluestacks

  adb, bluestacks, python

I have been trying to use ppadb (android debug bridge with python) together with bluestacks. I was able to connect adb to the emulator but was not able to connect it with the python lib. It doesn’t "not find" the emulator, it just stops and keeps searching and never goes beyond the line that searches for devices.

import ppadb
from ppadb.client import Client
from PIL import Image
import numpy
import time

adb = Client(host='', port=5555) #Stops on one of these two lines 
devices = adb.devices()

if len(devices) == 0:
    print("No device, dumbass")

device = devices[0]

Source: Python Questions