We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Behind proxy server: does processing work
Page Index Toggle Pages: 1
Behind proxy server: does processing work? (Read 1230 times)
Behind proxy server: does processing work?
Aug 20th, 2008, 4:34pm
 
hello there
i am having a weird problem with the loadimage function..
when i try to load a flickr image, it gives unknownhost error
and tells that
The file "http://static.flickr.com/1311/942847774_753e61a3c2_m.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
if one clicks the url it still doesnot open...

however on copy pasting the url, the image is displayed..
any clues why it is happening..

PImage i;
void setup()
{
 size(1024,768,P3D);
 PImage i = loadImage("http://static.flickr.com/1311/942847774_753e61a3c2_m.jpg","png");
}

void draw()
{
image(i,100,200);
}

DOES PROCESSING GIVE SOME TROUBLE BEHIND A PROXY SERVER?
Re: load image function
Reply #1 - Aug 20th, 2008, 8:43pm
 
it doenst open by clicking cause it interprets the " at the and as part of the imagelink...
http://static.flickr.com/1311/942847774_753e61a3c2_m.jpg

i know thats not what your actual problem was
Re: load image function
Reply #2 - Aug 20th, 2008, 8:47pm
 
but here is your fixed code :
you declared, i twice... and what was ,"png" for ?

PImage i;
void setup()
{
 size(1024,768,P3D);
 i = loadImage("http://static.flickr.com/1311/942847774_753e61a3c2_m.jpg");
}

void draw()
{
image(i,100,200);
}
Re: load image function
Reply #3 - Aug 22nd, 2008, 4:04pm
 
Actually the problem survives:
when i typed cedric's code too
then also it gave the following error:

java.net.UnknownHostException: static.flickr.com

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at sun.net.NetworkClient.doConnect(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.<init>(Unknown Source)

at sun.net.www.http.HttpClient.<init>(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at java.net.URL.openStream(Unknown Source)

at processing.core.PApplet.openStreamRaw(PApplet.java:4411)

at processing.core.PApplet.openStream(PApplet.java:4380)

at processing.core.PApplet.loadBytes(PApplet.java:4545)

at processing.core.PApplet.loadImage(PApplet.java:3611)

at processing.core.PApplet.loadImage(PApplet.java:3563)

at Temporary_7784_4647.setup(Temporary_7784_4647.java:17)

at processing.core.PApplet.handleDisplay(PApplet.java:1390)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)

The file "http://static.flickr.com/1311/942847774_753e61a3c2_m.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.



java.lang.NullPointerException

at processing.core.PGraphics.image(PGraphics.java:2124)

at processing.core.PApplet.image(PApplet.java:7573)

at Temporary_7784_4647.draw(Temporary_7784_4647.java:22)

at processing.core.PApplet.handleDisplay(PApplet.java:1465)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)


java.lang.NullPointerException

at processing.core.PGraphics.image(PGraphics.java:2124)

at processing.core.PApplet.image(PApplet.java:7573)

at Temporary_7784_4647.draw(Temporary_7784_4647.java:22)

at processing.core.PApplet.handleDisplay(PApplet.java:1465)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)
Re: load image function
Reply #4 - Aug 22nd, 2008, 4:17pm
 
the little code snippet i postet earlier still works fine when i try to execute it. Does it still dont work if you just execute this little piece of code and dont include it in yours?

of still not, try to change it to http://www.dec32.de/public/flickr.jpg and give it a try.

i uploaded it to see if maybe flickr is causing some problems...
Re: load image function
Reply #5 - Aug 22nd, 2008, 4:27pm
 
java.net.UnknownHostException: www.dec32.de

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at sun.net.NetworkClient.doConnect(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.<init>(Unknown Source)

at sun.net.www.http.HttpClient.<init>(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at java.net.URL.openStream(Unknown Source)

at processing.core.PApplet.openStreamRaw(PApplet.java:4411)

at processing.core.PApplet.openStream(PApplet.java:4380)

at processing.core.PApplet.loadBytes(PApplet.java:4545)

at processing.core.PApplet.loadImage(PApplet.java:3611)

at processing.core.PApplet.loadImage(PApplet.java:3563)

at Temporary_4774_7733.setup(Temporary_4774_7733.java:5)

at processing.core.PApplet.handleDisplay(PApplet.java:1390)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)

The file "http://www.dec32.de/public/flickr.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.



java.lang.NullPointerException

at processing.core.PGraphics.image(PGraphics.java:2124)

at processing.core.PApplet.image(PApplet.java:7573)

at Temporary_4774_7733.draw(Temporary_4774_7733.java:10)

at processing.core.PApplet.handleDisplay(PApplet.java:1465)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)


java.lang.NullPointerException

at processing.core.PGraphics.image(PGraphics.java:2124)

at processing.core.PApplet.image(PApplet.java:7573)

at Temporary_4774_7733.draw(Temporary_4774_7733.java:10)

at processing.core.PApplet.handleDisplay(PApplet.java:1465)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)
Re: load image function
Reply #6 - Aug 22nd, 2008, 4:29pm
 
no it still gives some error
does it have something to do with my internet connection
Re: load image function
Reply #7 - Aug 22nd, 2008, 4:32pm
 
hmm dont know, you should be online Wink i cant tell whats wrong, its working fine here... Maybe somebody else knows how to interpret this error messages
Re: load image function
Reply #8 - Aug 22nd, 2008, 4:39pm
 
does it work if you just put the grafik in your data folder ?

 i = loadImage("flickr.jpg");

maybe try this to see if the accessing the file online is the problem...

he seems to had a similar problem, just restarted... Smiley i know there are some people like me who didnt restart for days or weeks, hehe...

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1170105667
Re: load image function
Reply #9 - Aug 22nd, 2008, 4:44pm
 
oh no accessing files from data folder is fine...
online is the problem
Re: load image function
Reply #10 - Aug 22nd, 2008, 4:52pm
 
hmm sorry, no more ideas. its hard to check as it is working here...

but your are not running it from a webserver , do you? Cause...

"
The filename parameter can also be a URL to a file found online. For security reasons, a Processing sketch found online can only download files from the same server from which it came. Getting around this restriction requires a signed applet. "
Re: load image function
Reply #11 - Aug 22nd, 2008, 8:29pm
 
Maybe you have a firewall blocking Processing?
Try to temporarily deactivate any firewall (or proxy) and see if it works.
Re: load image function
Reply #12 - Aug 25th, 2008, 3:48pm
 
yes i am using a proxy net conncection(also veryyy slow at this moment)
is this a posible reason for problem because even the loadImage example is not working here

Page Index Toggle Pages: 1