runwayml/processing-library

Error when running examples

stigmollerhansen opened this issue · 1 comments

I am getting the error listed below when I attempt to run all of the provided examples in the HTTP folder. System setup: OSX 10.12, Processing 3.4, Runway 0.9.16. Not a bug per se I suppose, more a case of missing install instructions?

java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at java.net.Socket.connect(Socket.java:538)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
	at sun.net.www.http.HttpClient.New(HttpClient.java:308)
	at sun.net.www.http.HttpClient.New(HttpClient.java:326)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
	at processing.core.PApplet.createInputRaw(PApplet.java:6780)
	at processing.core.PApplet.createInput(PApplet.java:6738)
	at processing.core.PApplet.createReader(PApplet.java:6549)
	at processing.core.PApplet.loadJSONObject(PApplet.java:5901)
	at com.runwayml.RunwayHTTP.setup(Unknown Source)
	at com.runwayml.RunwayHTTP.<init>(Unknown Source)
	at CycleGAN.setup(CycleGAN.java:72)
	at processing.core.PApplet.handleDraw(PApplet.java:2387)
	at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1540)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)
The file "http://127.0.0.1:8000/info" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
error parsing JSON from /info HTTP route
java.lang.NullPointerException
	at processing.data.JSONTokener.<init>(JSONTokener.java:58)
	at processing.data.JSONObject.<init>(JSONObject.java:226)
	at processing.core.PApplet.loadJSONObject(PApplet.java:5901)
	at com.runwayml.RunwayHTTP.setup(Unknown Source)
	at com.runwayml.RunwayHTTP.<init>(Unknown Source)
	at CycleGAN.setup(CycleGAN.java:72)
	at processing.core.PApplet.handleDraw(PApplet.java:2387)
	at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1540)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)

@stigmollerhansen The error is saying /info is inaccessible which most likely means you are running the RunwayML application, but you are either:

  1. Not running any RunwayML models inside your current workspace (you need to run at least one)
  2. Not running any models on the default port (e.g. for HTTP (most examples) is port 8000).
    (Could happen potentially if you started running multiple models then stopped running the first one (so http://127.0.0.1:8000/info doesn't work, but http://127.0.0.1:8001/info may for example, in which case you can explicitly specify a port: runway = new RunwayHTTP(this,"127.0.0.1",8001);)

@cvalenzuela Should I add a more descriptive error message regarding the above ?