Skip to main content

Ubuntu: lsb_release: NameError: global name 'unknown' is not defined

A recent upgrade from Ubuntu Gutsy to Ubuntu Hardy started causing apt to fail due to an internal failure in lsb_release:

# lsb_release
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 327, in
    main()
  File "/usr/bin/lsb_release", line 291, in main
    distinfo = get_distro_information()
  File "/usr/bin/lsb_release", line 254, in get_distro_information
    distinfo = guess_debian_release()
  File "/usr/bin/lsb_release", line 213, in guess_debian_release
    rinfo = guess_release_from_apt()
  File "/usr/bin/lsb_release", line 169, in guess_release_from_aptv     version = RELEASE_CODENAME_LOOKUP.get(unknown, rinfo.get('suite',''))
NameError: global name 'unknown' is not defined

The problem turned out to be due to these two entries in /etc/apt/sources.list which were being used to get Polarion:

deb http://debian.sh.cvut.cz/debian/ etch main non-free
deb http://security.debian.org/ etch/updates main contrib

Commenting them out fixed the problem. I guess they don't work well with Hardy.

Comments

Popular posts from this blog

Migrating from Palm Calendar to Google Calendar and iPhone

Here are the free steps to migrate from Palm's date book (or Pimlico's DateBk6 ) calendar to Google calendar for full iPhone sync. First, sync Palm with Palm Desktop . Next, open Palm Desktop, select the Calendar view, navigate to File | Export, select Export Type as Date Book Archive, Range as All and provide a file name. This will export the calendar data as Date Book Archive (.dba). There's a paid tool called DBA2CSV that converts .dba files to .csv files. However this can be done for free using Yahoo Calendar. Login into Yahoo Calendar and via Settings/Import, import the .dba file. It helps to have an empty Yahoo Calendar. Via Settings/Export, export the calendar as .csv file. Login to Google Calendar (also works with Google Apps For Your Domain GAFYD Calendar) and import the .csv file into any of the calendars. It is a good idea to create a test calendar and test the import before importing into your real calendar. That way if anything goes wrong, you can delet

Lead Tide SIM Reader

I recently came across a cheap little device for reading SIM cards . It was available from Meritline for less than USD 5 with free shipping. Curious to see what it was like, I ordered one. The device came in a small package along with a mini CD containing drivers. The packaging advertised the device as the LEAD TIDE Sim reader . Like most things these days, it's made in China. The device has a USB 1.1 interface. There was no product code or number anywhere on the packaging. Installing the drivers for the device turned out to be harder than I expected. The mini CD's autorun installed some stuff but Microsoft Windows XP couldn't install any suitable driver for the device. The mini-CD had several top level directories with what appeared to be product codes but I couldn't match any to the device itself since it had no product code. Google searches revealed that I wasn't alone in my endeavors to get the device working . Further digging revealed pointers to some thir

Syntax-highlighting code in blog posts

SyntaxHighlighter is an easy to use syntax highlighter for posting code snippets in blogs. Here are the steps to incorporate SyntaxHighlighter into Blogger : Go to the blog dashboard and select Layout for your blog. Choose Edit HTML. In the <head> section, paste in these two lines: <link href='http://syntaxhighlighter.googlecode.com/svn/trunk/Styles/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/> <script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js'/> In addition, for each language that you intend to highlight, add lines to import the relevant JavaScript libraries. The full list of supported languages is here . Here's the example for XML: <script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js'/> Finally, right at the bottom before the </body> tag, add: <script