Loading...
Logo
Processing Forum
The rita folder is in the sketchbook folder under libraries right along with Open CV. The OpenCV shows up under Contributed Libaries but RiTa does not. When I put one of the rita examples into P and try to run it, I get this msg.:


No library found for rita
Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.

And the top level of rita has the same pattern as opencv. I have restarted Processing twice. I have even shut down the machine and started up again.

Anyone have any ideas about this? (Of course I first followed rita's own install text which said it should be installed in a libraries folded under Processing-*. When that didn't work I tried the standard way.)

Thanks.  ( LINUX users with problems in this area, check the last post here.)


Replies(8)

EDIT:

 Did you restart PDE? 

Sorry, I somehow missed the second part of your post :)


I have RiTa installed inside of processing sketchbook folder / libraries / RiTa 

here's the screenshot.  I wonder maybe there's some erorr with capitalizatino of the library names and library folders? (As you're using linux)





What is your directory structure?
Yes, I did, as I said in my post. Also restarted my machine.
And, subsequent to all of that described in my post, I selected another library to install -- Yahoo Weather. It installed perfectly, and appeared, immediately under the Contributed Libraries, without my even restarting Processing.

Thanks for replying so fast!!
Maybe you have more insights??
I think I managed to replicate your problem:






Seems like the problem is because the folder where RiTa is installed on your machine is called [RiTa] and the main JAR-file of the library is called [rita.jar]. The name of the libraries folder [RiTa] should match the name of the main jar-file :[rita.jar]. In linux RiTa and rita is different. So seems like this may be your problem.

You have to try one of the two methods:

DIRECTORY WAY
a) close all PDE instances
b) rename RiTa directory to r ita

JAR WAY
a) close all PDE instances
b) rename rita.jar to RiTa.jar


That's the best guess of what could help you. As I have Windows machine, I cannot replicate your problem 100% indentically, but that's the closest I got.
i would prob. go for DIRECTORY WAY first
I'm on Linux - Mint 15 LXDE desktop.

/opt
/processing-2.0.2/sketchbook/libraries/RiTa/library

and under library are two files: rita.jar and rita.js
 
What I find interesting is that the Yahoo Weather which appears as it should under contrib. libs. IS NOT showing up where OpenCV and RiTa are????

And when I run the line import yweather.*; it gave the same "not installed" msg. BUt, I had forgotten to restart P.
After restarting the line gave no errors BUT BUT Yahoo Weather no longer shows up under Contrib. Libs.

I think what we may have here is a small bug.

dlmkir ---
YES -- you did -- that was it.
I use import rita.* and got no nasty messages.

However, it does not show up under Contrib. Libs. still. And that's what I mean about this being a slight bug, as the Yahoo Weather lib does not show up there either.

Interestingly, I saw this very soon after install - and tried import RiTa.*; but that didn't work either.

Anyway -- thanks so much!

Clair

If you open rita.jar (it's basically just a zip-file renamed to have "jar" extension), you will see that the name of the package

rita.*;

is in lowercase (as it is commonly accepted in Java):




However if you look inside the folder (which java/processing sees as "look inside the package"), you will see that all of the classes are ProPerLy CapitaLized:





This is why

Copy code
  1. import RiTa.*;  // doesn't work, as the package is in lowercase

  2. import rita.*;  // this will work as the package name is in lowercase

  3. import rita.RiAnalyzer; // this will work, because it specifies package name 
  4.                                  // in lowercase, but the name of the  class itself is capitalized.

As to why it doesn't appear in the list of libraries in PDE, then it is probably because you have renamed directory from [RiTa]  to [rita] and library name described in library.properties (RiTa) doesn't match the new directory [rita]  name. 

Which means that out of the two approaches (DIRECTORY or JAR) we have chosen the wrong one. We should just have renamed rita.jar to RiTa.jar  


Alternatiely (if you still want to stick with the DIRECTORY WAY you can open library.properties and manually edit library name. This is kinda "dirty hack" way, but if you don't like the JAR WAY or it doesn't work then you may do this:



EDIT:

also as you have renamed your directory to [libraries/rita], then the path in your editor to library.properties will be not the same as on my screenshot. It will be [libraries/ rita/library.properties]
FOR OTHER LINUX USERS:

In the end, I realized that I needed to change the permissions  on the processing-2.0.2 folder for the library installs to work correctly on the first try. (This is in addition to changing the RiTa folder to rita.)

Update: I did more research and really, the permissions only need to be changed on the skectchbook folder, which of course makes sense.

and DLMKIR --
Once I changed the permissions -- all three libs appeared in the sketchbook folder as they should!

I ran a rita example and a weather example -- all were fine. WHEW.

AND MANY thanks, my friend!
Clair