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

AD-5526 Digital Multimeter

The AD-5526 is an ancient multimeter from A&D but for $10 one can’t complain. Has all the basic features one would expect from a multimeter and at 5.2 cm X 9.5 cm X 2.6 cm, it’s quite compact. Uses a LRV08 12V alkaline battery – not a common battery in the USA.

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...

RTL-SDR, Raspberry Pi and Plane Spotting via ADS-B

Most modern aircraft carry an ADS-B ( Automatic Dependent Surveillance - Broadcast ) transmitter that puts out information about the aircraft's identification, geospatial location, speed, and heading. This information is received by ground stations and air traffic control and used as a replacement for radar-based tracking. ADS-B relies on line-of-sight communication via signals transmitted at 1090 Mhz and has a range of up to 250 nautical miles. Sites such as FlightAware , FlightRadar24 , Plane Finder , RadarBox24 , etc. collect ADS-B information using a vast array of ADS-B receivers, some of which are run by hobbyists, and present this information on maps with near-real-time updates. With the advent of cheap software-defined-radio (SDR) dongles, over the past few years, it has become extremely cheap and easy for amateurs to receive ADS-B signals, upload data to these sites and, in exchange, get access to premium features from these sites. This guide will walk you t...