Google search bar

January 31, 2009

I messed up my install of Juice podcatcher

Long explanation (If you want the skinny, just look at the summary below)

Update, 2/1: the fix was not completely successful. See the update at the end.

This isn't really a software engineering topic. But, hey! It's my blog. Someone might really need this information!

So I wanted to try the Juice open source podcast receiver (some people call them podcatchers). As of my writing this article, the current version is 2.2. I installed it, started it, opened up the preferences and saved them with a wrong path to the directory where my podcasts should be saved. I think the problem is that by default the path was wrong for Vista. It was "C:\Users\\My Documents\My Received Podcasts"

But it should have been "C:\Users\\Documents\My Received Podcasts".

After I saved the preferences with the invalid path, Juice would crash every time I tried to start it. The following is from the log and shows the error that was crashing Juice.
Traceback (most recent call last):
File "gui.py", line 4, in ?
File "iPodderGui.pyc", line 3573, in main
File "ipodder\configuration.pyc", line 468, in __init__
File "os.pyc", line 154, in makedirs
OSError: [Errno 17] File exists: 'C:\\Users\\Ari Zelanko\\My Documents\\My Received Podcasts'
I tried to find a solution by googling the error. It didn't yield anything. Several people had posted questions on many sites about similar problems. No solutions were published.

I tried to reinstall the application. I uninstalled and reinstalled. No improvement. Juice still crashed on startup. I opened up the readme file in the Juice install directory. It has a section about updated from an older version of Juice (formerly iPodder). This is a quote from the Juice 2.2 readme file:
In iPodder 1.0 the settings were stored in the iPodder installation directory, probably C:\Program Files\iPodder. Starting with version 1.1 the configuration are placed outside the installation directory, in a user-specific directory, if possible. The default location is the NT-style Application directory, usually C:\Documents and Settings\yourname\Application Data\iPodder. If your settings were lost, try locating these three files in the previous installation directory and copying them to the new configuration directory: favorites.txt, history.txt, schedule.txt.
So, I started to look around my user directory for the settings. I found them. On Vista the path to the configuration was "C:\Users\\AppData\Roaming\iPodder".

"I'll just remove the settings folder and Juice will start up normally, right?" I thought. So I deleted the iPodder directory under my user profile. I started up Juice and voila! There was no change. Juice still crashed with the same message! How infuriating! (I should stop the gratuitous use of exclamation points!)

Just when I was about to give up, I thought, "Maybe if I reinstall right now, the problem will go away." ... And that worked.

Summary

The problem:
Because I set an invalid path-to-save-my-podcasts-to in the Juice preferences, the application wouldn't start. Rather it would crash on startup.

The error log:
Traceback (most recent call last):
File "gui.py", line 4, in ?
File "iPodderGui.pyc", line 3573, in main
File "ipodder\configuration.pyc", line 468, in __init__
File "os.pyc", line 154, in makedirs
OSError: [Errno 17] File exists: 'C:\\Users\\Ari Zelanko\\My Documents\\My Received Podcasts'
The Solution:
I removed the iPodder config directory under my user profile ("C:\Users\\AppData\Roaming\iPodder"). I then ran the Juice 2.2 installer again. I started the app and this time set the right directory for saving podcasts!

Update: The fix wasn't successful (2/1/2009)
After a restart, the problem in this post returned. For now I've carefully reproduced the issue, entered a bug with the project and included logs, config files and such. I've uninstalled Juice for now. I think I will look for another free podcatcher program.

January 27, 2009

Java Resources

Thanks to theServerSide for this great article by Ted Neward.

It contains a lot of resources for an up-and-coming java dev.

January 16, 2009

Install Ruby from binaries on Windows

Suppose you want to install ruby on Microsoft Windows and you don't want to use the One-click installer. Maybe it's because the installer is for ruby 1.8.6 and the newest stable binaries are for 1.8.7. You just have to get the most up-to-date binaries, because obviously 1.8.6 is just way too old.

I looked around for instuctions and found the answer posted by Lolindrath at stackoverflow.com.

  1. Download the windows binaries for Ruby 1.8.7 here: http://www.ruby-lang.org/en/downloads/ extract that to wherever you would like, I use c:\ruby. Then put c:\ruby\bin in your PATH environment variable.
  2. Download the zlib package: http://www.zlib.net/zlib123-dll.zip and extract the zlib1.dll, rename it to zlib.dll and move it into your Windows\System32.
  3. Download the iconv package: http://sourceforge.net/project/showfiles.php?group_id=25167&package_id=51458. Find and extract the iconv.dll into your Windows\System32.
  4. Download the rubygems package and follow the instructions, basically extracting the package and running ruby setup.rb
  5. Verify that everything works properly by trying a gem install rails, once that installs then do: rails test_project
These are the steps just as they were posted. I didn't just download the libraries from the links above. I checked for newer versions, but as of this post, there were none. I have not done step five. But I've installed a few gems and a couple of scripts I've written run fine.

January 14, 2009

That file isn't open!

I sometimes need to do something like delete a file and I can't because, according to windows, a program has the file open. Sometimes this happens because a process doesn't exit when you think it has.

Do you want to find out what program has a file open?

You can do it with a free program called ProcessExplorer.
In the program's Find menu choose 'Find Handle or DLL...' (Or press ctrl-F)
Enter a part of the file's name. Press enter. Voila! You now have a listing that includes the process id that has that file open. If you kill the process, you should have no trouble deleting that pesky file.

If you are not sure what killing a process is or if you should, then just restart the computer and that should fix the problem.