Cannot import libraries

Hello all,

I’m a beginner to Processing, I’ve been using it for a few months now and everything is going great. Today I was hoping to start working with sound, and so I needed to import the sound library. I saw it could only be imported through the contribution manager. Here’s the issue: Iget this message every time I try to open the contribution manager.

Could not connect to the Processing server. Contributions cannot be installed or updated without an Internet connection. Please verify your network connection again, then try connecting again.

I tried, without resolving the issue:

  • Restarting Processing
  • Restarting my laptop
  • Making sure the network properties are set to private (I’m using Windows 10)
  • Turning off all proxy settings
  • Checking that I’m not still somehow on a proxy - it really looks like I’m not
  • Using a different wi-fi network where I’m staying
  • Using the wi-fi hotspot on my phone
  • Creating a firewall exception for Processing
  • Turning off the firewall completely

I tried looking in the preferences file for Processing but I honestly don’t know what I’m looking at and I don’t want to further mess anything up.

Any ideas? I’ve read all the similar issues that have been posted either here, on github or on the old processing forum but I haven’t found a solution.

Here’s what prints to the console when I press “Try again” on the error message in the contribution manager.

java.net.SocketException: Can't connect to SOCKS proxy:<my.proxy.ip> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:428) at java.net.Socket.connect(Socket.java:589) at sun.net.NetworkClient.doConnect(NetworkClient.java:175) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) at sun.net.www.http.HttpClient.New(HttpClient.java:339) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1227) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1175) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309) at processing.app.contrib.ContributionManager.download(ContributionManager.java:82) at processing.app.contrib.ContributionListing$1.run(ContributionListing.java:385) at java.lang.Thread.run(Thread.java:748)

Thanks a lot and sorry if this is a dumb question but I really tried and I really can’t figure out what’s wrong on my own.

3 Likes

Hey There!

Can you give us some context on what the library and some code ?

Hi!

The specific library I’m trying to import is just the Sound library by the Processing Foundation, this one: https://processing.org/reference/libraries/sound/index.html

The issue is not with any code in particular, the exact same issue is still encountered with a new blank Processing file. I can’t access the contribution manager through the Processing IDE at all, so no access to Modes, Tools, Examples or Updates either.

1 Like

When you try and run this.
What occurs?

import processing.sound.*;
Sound s;

void setup() {
  size(200, 200);

  // Play two sine oscillators with slightly different frequencies for a nice "beat".
  SinOsc sin = new SinOsc(this);
  sin.play(200, 0.2);
  sin = new SinOsc(this);
  sin.play(205, 0.2);

  // Create a Sound object for globally controlling the output volume.
  s = new Sound(this);
}

void draw() {
  // Map vertical mouse position to volume.
  float amplitude = map(mouseY, 0, height, 0.4, 0.0);

  // Instead of setting the volume for every oscillator individually, we can just
  // control the overall output volume of the whole Sound library.
  s.volume(amplitude);
}

Can we get a screen shot ?

Absolutely!

That’s the entirety of the error message that prints.

No library found for processing.sound Libraries must be installed in a folder named 'libraries' inside the sketchbook folder (see the Preferences window). The package “processing.sound” does not exist. You might be missing a library.

1 Like

Hm interesting. I would say troubleshoot. But maybe just try install a new version of processing ?

It’s not ideal, but you may try out to grab libraries using PDE v3.4 instead of v3.5.3: :woozy_face:
Download.Processing.org/processing-3.4-windows64.zip

  • Remember to close v3.5.3 before running v3.4. :warning:
  • Once you got everything you needed, close v3.4 and go back to v3.5.3. :wink:

Or just manually download and install the library.

Download Here

Install using Instructions found here.

You’re getting this error

because you don’t have the library installed.
And you can’t install the library through the contributions manager because of what ever reason that is causing this error.

I would venture to say that this is a internet problem but you say that you tried practically everything to fix it, so I can’t help you there.

But if your web browser works, then you can install libraries manually, and you won’t get the import error.

You also won’t have to install multiple versions of the PDE. :grinning:

1 Like

Hey! I tried deleting and reinstalling Processing, to no avail. Did you mean troubleshoot the Internet connection or follow the troubleshooting section in the Processing.org FAQ section? Thanks!

Hi, thanks for taking the time to help me out!

I agree 100% with your assessment. I also thought of just installing the library manually but it does say on the Processing.org website that "The Video and Sound libraries need to be downloaded through the Library Manager. "… I guess I’ll try to do it manually anyway and see what happens!

Otherwise I’ll try @GoToLoop 's suggestion. If it works that way, I guess that will mean there’s some strange issue with the specific Processing release I’m using and whatever is going on with my computer.

Thanks all, I really appreciate the help!

Okay, I’m really stumped now. Manually downloading and installing the library does not work, and the same problem shows up in Processing 3.4.

Everything else is working absolutely fine with my internet connection by the way.

FIXED!

Deleting the preferences file and restarting Processing to force it to create a new one fixed the issue.

4 Likes

sorry not see your last good news…
anyhow:


can we go back to the beginning:
you say:

this sounds wrong and might show that there is a very different processing install issue.

“sound” is a integrated library, so when you
download and unzip any processing version
it is there already, possibly with Processing 3.5.3
can / need to do a update to sound rev 2.2.0

BUT if you want use “minim” sound library, then you need to install it.

so after a new “install” ( download unzip ) processing 3.5.3 you

  • start processing
  • open examples sound FFT
  • run it
  • open the contribution manager and find “sound” and its installed version.

all this you can show us in ONE picture, like

Glad you found the problem.