12

bad interpreter: No such file or directory

96px-Shebang

Earlier today I was trying to run a Python script that I downloaded from the internet. Bash (or the kernel, to be exact) refused to run the script, insisting that python didn’t exist:

$ mem.py
-bash: /home/natan/bin/mem.py: /usr/local/bin/python2.5^M: bad interpreter: No such file or directory

The script agreed to run indirectly with python ~/bin/mem.py
I googled and discovered that the file was encoded in DOS format with improper line endings.

To fix the problem, I copied the contents of the file and pasted them into a new file. Voilà. The shebang became magical again.

Then again, you can also fix the problem permanently. (Don’t.)

ln -s sh "sh$(printf "\r")"

photo credit: Sven & Lirion

0

Snowy Database Schema

Django - The Web framework for perfectionists with deadlines

For GCI (Google Code In) I’m working on Snowy, the Django-based application to view and synchronize Tomboy notes online. My task is to add support for multiple OpenID accounts.

To get started, I used django_extensions to generate a graph of the database schema.

… Continue Reading