Search code examples
pythonngrokpyngrok

In Python pyngrok error for .replace method


I get an error on this line:

link = ngrok.connect(4040,"http").replace("http","https")

Error:

Instance of 'NgrokTunnel' has no 'replace' member


Solution

  • I've tested it.

    Your link is no string. You have to convert it into a string in order to replace text.

    This works with the function str().

    link = str(ngrok.connect()).replace("http", "https")