2009-11-18

Preupgrade crash when resuming

UPDATE

Seth Vidal has a better solution. Rather than just catching the exception, you can prevent it by correcting the error in the code, as noted by Anonymous in the comments:

Patch from Seth Vidal:
https://bugzilla.redhat.com/show_bug.cgi?id=538118#c41

diff --git a/preupgrade/__init__.py b/preupgrade/__init__.py
index 2e82f1e..d79ec4b 100644
--- a/preupgrade/__init__.py
+++ b/preupgrade/__init__.py
@@ -325,7 +325,7 @@ class PreUpgrade(yum.YumBase):
rf = open(repofile,"w")
for repo in [self.instrepo] + self.repos.listEnabled():
# adapted from YumRepository.write()
- repo._grabfunc.opts.user_agent = __user_agent__
+ repo.grabfunc.opts.user_agent = __user_agent__
yc = yumConfigParser()
yc.add_section(repo.id)
for k,v in repo.iteritems():

So the problem is that it tried to use _grabfunc, which doesn't exist, instead of grabfunc. Yay.

I was trying to upgrade to Fedora 12 today via preupgrade but had to stop my upgrade session due to a network issue. When I tried to resume, as you're supposed to be able to do, it started getting the metadata again and then it suddenly crashed!

[root@localhost ~]# preupgrade
/usr/lib/python2.6/site-packages/yum/__init__.py:203: UserWarning: Use .preconf instead of passing args to _getConfig
  warnings.warn('Use .preconf instead of passing args to _getConfig')
Loaded plugins: blacklist, dellsysidplugin2, presto, refresh-packagekit,
              : whiteout
Detected in-progress upgrade to Fedora 12 (Constantine)
....
preupgrade-updates (mirrorlist) 
  url: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f12&arch=i386
  now: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f12&arch=i386
unknown metadata being downloaded: metalink
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 764, in 
    widgets = PreUpgradeGtk()
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 376, in __init__
    self._do_main()
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 259, in _do_main
    self.main_preupgrade()
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 436, in main_preupgrade
    download_progressbar=self.dnlProgress)
  File "/usr/lib/python2.6/site-packages/preupgrade/__init__.py", line 130, in setup
    self.complete_repo_setup()
  File "/usr/lib/python2.6/site-packages/preupgrade/__init__.py", line 328, in complete_repo_setup
    repo._grabfunc.opts.user_agent = __user_agent__
AttributeError: 'NoneType' object has no attribute 'opts'

That's obnoxious. I didn't want to restart it, as I'd already downloaded over a hundred MB of files. So, as root I looked at the file tripping the AttributeError, /usr/lib/python2.6/site-packages/preupgrade/__init__.py, and decided to catch the error:

    repo._grabfunc.opts.user_agent = __user_agent__            

became

try:                                                            
    repo._grabfunc.opts.user_agent = __user_agent__             
except AttributeError:                                          
    print "Can't set user_agent, repo._grabfunc = NoneType :( "

I then ran it again, and this caught two exceptions, but allowed me to proceed with seemingly no loss of functionality. I am now happily downloading still more amazing amounts of MB. Hurrah!

Now to file a relevant bug if it doesn't already exist. The oft duplicated, already existent RH bug is 538118.

Labels

#General #Microblog friends life #Technology gnome music google guelph iaido vegan fedora food school #GNOME #School bugs linux jodo gxml technology blogger nature web happy #Budo art vala work Flesherton android internet stress firefox #Photos anime birthday dad home travel kendo kosmokaryote security computers cookies development environment future open source writing animals canada reading sick snow video GUADEC css science ta winter cell phones christmas evolution language love me movies people phone sleep vegetarianism fun german gsoc learning speech Toronto ai birds dreams git gseta identity new zealand night picasaweb programming skedge stars tea time vancouver vlogbrothers adventure cake consumerism fedora 17 happiness nlp responsibility society tablet wind mobile Josh Ritter Nintendo baking books communication design google+ humanity javascript libgdata meaning netflix photography photos pidgin quote speechdispatcher sushi weather Spain TAing animalia cat chocolate cold family film flight genderguesser halloween liv magic memories memory money new years nightmares psychology rain recipes the legend of zelda tv ubuntu uoguelph xorg youtube Thanksgiving acer bc blogging bug conversation cycling death emusic facebook fedora 18 galaxy nexus gay rights gitorious health japan knowledge languages mail nerdfighteria organisation politics privacy productivity rhythmbox software sound space swords upgrade valentines video games web development xml #Vegan Con-G Europe John Green Scott Pilgrim The Frames age animal welfare apple autumn brave breath of fire II busy calm clothing comments conservation cooking creativity culture dance dataloss djaqua e-mail encryption feminism gdom germany gmail google reader gtk japanese laundry law libxml2 martial arts materialism math morning ottawa peterborough pets philosophy pie quality sei do kai shopping spring style university value village vday vonage wahoo water web design x11 New York alone anime north anxiety argument bash blog brain budo buffy business camera cats change computer science concert confidence duolingo duplicity emacs energy english errors failure fedora 19 freedom french games gdata greyhound habits heat history house html im information intelligence koryu laptop light living moon mozilla nostalgia nz pain photo php physics pirates pizza play poverty preupgrade purple python reflection religion research rss self serialisation sharing skating social summer sun synergy tachi uchi themes transit turtles veggie challenge velociraptors violin walking weekend zellers API Air Canada Empathy Hank Green Hugo Jane Austen Lord of the Rings Nexus One OCUS Sudbury Trick or Eat arboretum audible autonomous automobiles backup bike browsers camping canada day cancer canoeing celebration charity chrome colour community content corporations data loss decay decor depression depth disaster drawing eating economy emotion epic equality exercise faery fest farmer's market fedora 12 fedora 16 fedora 20 fedup flowers friend gender ghetto ghosts glib gnome blog gnome shell goals google talk green growth hair hobocore humour hungry icarus ice cream interest introspection java joy last exile lost macbook mail-notification meat in vitro microsoft mind mom moon festival motivation moving mtp muffins mystery news ninjas oh the humanity pagans papers past picnics pitivi plastic pride progress pumpkin pumpkin pie quiet thrill rae spoon reality receipts rogers rpm seminar simple sleep deprivation smells soy milk speech dispatcher sports stories strange streamlines swimming telephone temperature testing texting thesis thinking thoughts thrift stores time management tragedy truth understanding urban ecosystems voice volunteering webschwerver website wild working world yojimbo yum zoology Avatar: The Last Airbender Blassreiter CIS*2750 CIS*6890 Czech Republic Diablo Dresden Codak Dunedin Dutch Blitz Electric Networked Vehicle Elliott Brood Ender's Game France Fringe GNOME 3 HTC Hayao Miyazaki Montréal Newfoundland Ontario Ouran Host Club Richard SVC Samsung Samurai Champloo Santa Claus Studio Ghibli TCAF US academics adb algonquin amusing animal agriculture apartment awkward bad movies banana bats battery beard beauty belladonna beta bicycle blogs book branding breakfast brno bus buses buy nothing day cabin candy cars catastrophe celebrate celtic chat cheese childhood china chinese calendar cities clarity clean cleaning clock comics compassion compiler consumption context convention cookie cool copyright cornerstone cosplay cottage country court crafts creation cthulhu cupcakes dancing dark themes dbus definition democracy despair dinosaurs discomfort diy dns dodgeball dragon dress dust dystopia earth earth day education efficiency eggs elections email enhanced history ethics evil exhausted expectations experience exploring fail fair trade fashion favourite feedly feelings ferry file systems fireworks focus formal free fruit fudge full moon furniture gaelic game boards garden gardening gee genetics gimp gir gobject good google hangouts google wave government grading gratitude green roofs groups gsec guerilla gardening haircut help homosexuality honesty howl hp human rights humanitarianism humility hypocrisy ice images imaqua instant messaging integration internet explorer jabber jelly bean jobs jokes kernel keyboard labs last exile: fam the silver wing laurena letters library livejournal lizzie bennet loneliness loss lovely lyrics maps mario maturity meditation melancholy metadata microbes microfinancing microwaves moon cake mother music concert muso jikiden eishin ryu myth namespaces nerdfighter neural networks nintendo 3ds normal normality notes obsolescence oceans open open souce open standards panasonic pants paper parties patches peanut butter performance perl personal perspectives philanthropy phones plants pleasant politeness potluck preparation ptp pulseaudio quidditch recreate redundancy relax richard's room roses rsync running sad sadness salsa samurai sanity schwarting seasons self-navigating car selinux semiformal senility sensitivity sentimental sewing sheep ships silicon motion simplicity sleeping in sms software engineering solitude solutions songs soup ssh star wars story telling strangers stupid success sunset surreality survival skills sustainability sweet symphony tardigrades tasks teaching technical communication and research methods test tests thought thrift tim tams time and space time travel tired tools tracker tradition tranquillity transience trees tumblr united states update usability usb utopia veganism via vihart vlog waffles warmth waste waterloo wave web comic webkit weird wii wiki winter is coming wireless wizard wonder woods xmpp yoga youth zoo #Life #Wishlist 1602 1984 24fps 404 All My Children Andy Griffith Argentina Armstrong House Avatar: The Legend of Korra BarTab Boston Boston Summit Businesses CIS*6050 Cambridge Christopher Plummer Claymore Creatures Darker than Black David Attenborough Dear Wendy Docking Station Dollhouse England Excalibur February Fergus Final Fantasy IX GError GSA Go Hunger Games I believe in a thing called love IRC Ikea Ireland JRR Tolkien King Arthur MIT Mac OS X Madrid March Mario Kart Massachusetts Matlock McGuinty Melodies of Life Merlin Michael Cera Mother Mother Mr. Tumnus Narnia Neil Gaiman Network Manager New York Philharmonic Nick and Norah's Infinite Playlist Nintendorks Norns North Korea NotesFromNewYork Olympic OpenShot Orphen Orson Scott Card Oscars PEAP Pete Peterson Planet Fedora Porco Rosso Questionable Content R ROM Rent S SIM Wireless Sauble Beach Shakespeare Snakes and Lattes Star Trek Steve Grand ThanksLiving The Darkness The Fifth Estate The Guild The Hobbit The Stand Tianjin Tim Hortons Tolkien UK Will Grayson Will Grayson Wolves in the Wall WordPerfect Xiki abrt abuse accessibility active activity addiction adrift adulthood advertisement advertising aeroport air airport express airship ajax al gore alarm clock aldiko alice in wonderland alien alistair summerlee amateur amazon ambience ambition amy winfrey anaconda angry birds anhosting animation anon anonymity ant apache apology appearances appreciation aqualab arcade arduino arrogance ask assassins assignments association analysis astrid asus eee top asynchronous ati attribution aural abuse authentication authenticity automake automarker avatars awesome backtrack3 backyard bounty bad bagel bandwidth banks barbarians barefoot baseball bathroom beaches beautiful bed bees beetles being belief bellaqua benedict cumberbatch berlin bertrand russell bill gates biofabrication biology biometrics black and white blame blockbuster bloomberg blue board games bohemian bold bon thé place bonds border boredom boxing day boy brain scoop brickworks broccoli bubbles bubbly burn bus stops butterflies buttons c# c++ cafe calendaring calligraphy camel camera obscura cameras canopy capitalism cards careless caring cast causality cbc cedar row cello censorship certainty cgi chalk challenger changing locks chaos theory charm cheap cherry blossoms chickadee chickens chivalry choir chopsticks chores christchurch christianity chudan church cijf cinnamon classes clif clorox clorox green works cloud cloud atlas clubs cname coca cola codeine codeviz coincidence coins color comfort commons communism competence competition competitive coughing completeness compliments computer conference conflicted confusion consciousness consent conservatives conservativism console conspiracy theorists construction contagion contest contributing convenience corpses cough suppressants coughing coupons courageous crashes crates crayons crazy creative commons criminals crisps criticism crosscanada crowd crtc cry crying cryptic cryptozoology csh cult current tv curse customer service customisation cute cvs daily grind data data mining databases david bowie dconf debate debug symbols debugging delicious design patterns desktop desktop summit destiny detachment dftba diet difficult digimon digital receipts disabilities disappointment discordianism dispute dissection kit distraction diyode doctors documentation dokuwiki doubt doughnut dpkg drab drano drano prevention dreaming drinking drm drowning dryers dtwydt ducks dvds dying dynamic typing easter easy ebony jewelwing ebooks ecards editors eeetop el paso elder neglect electronic receipts elements ellen page embarrassment emily graslie emptiness empty enchant end of enterprising environmental science symposium eog epiphany eplugin equipment essentialism ether euphoria evoaqua experiment expertise ext3 ext4 extensions extortion facades faith falafel fall familiarity fan fancy fantasy fascism faun favicon fears fedora 11 feed me feedback festival fibonacci fiction fiddler crab field guide field identification figment figures of speech finances fire fish fixing flac flexibility flour flow flying fonts footprints forceps forgottotagit fork fortunate fortune fragaria frameworks fraud fred penner free time freezing french fries fresh friday friend's wedding frog fspot funding funerals funny fury fuse gargoyles gdb geek geeks gf3 gi gifts gio gjs glass globalnewtgames glory gloves glue gluten gm gmo gnome keyring go ninja go go transit goat gods goodbye goodfella's google books google wallet gp2x gqe grad graffiti grammar graphing graphviz grass green beaver grey county groceries growing up gtest gtg guts gypsies habit hakama hal halls hard hardship hardware harry potter hdtv heart heart break heaven 17 hemlock grove hewlett packard hijinx hiking holidays homelessness homework honey badgers honour horatio hornblower horror hostels hosting hot house of cards hp lovecraft hugs humblebundle humbleness hunting hyperlinking hyrule i am a carpet ibm thinkpad x41 icalendar ice cream sandwich ice rain icthyology ignorant ill image image editing imagination impermanence inadequacy inaturalist inconvenience independence india individuals industry infinity ingrid michaelson inhumanity injuries ink innovation insects installation intel interactivity interlocutor internet tv invertabrates io irish irony isolation it it is indigo james bond jazz jedi jikiden journalism journey judgement julian assange julie thiel justice kata kayak keys ki-ai killme kim taylor kinder kirby kitchen kiva knife knights knots kodak koodo kung fu labels landau sacamoto late lazy legend lending lessons letstrace letter writing liberalism liberals libnotify librpm libxml lifehacker lilo limericks limits linksys liquid live wallpapers loans local local food local install login london losher lots of hugs luks mac mini machine learning machine vision madness mae magic school bus magical maintainership majesty malaria malls mantis shrimp marine life marketing marking massages matrices maturation may seminar meat media medicine mel's diner mental health meow metacity metaphor methodology mezzo forte micropayments mild mild weather military milk mindhacks minimalism misanthropy miscellany misery misfortune missed the boat missing mlp moisture mold molly parker monitors monologue mood morality more cats mosquitoes moss mother's day mouse moxies muffin muffinfilms mundane murder museum mushishi mushroom soup mushrooms musicals mutual funds my slumbering heart mysql nameservers nanowrimo nasa national treasure natural language processing naturalism nausicaa navigating necessity neighbours nervous netgear network new new users newspaper hat next year ninja turtles nodelist nointernet noise noisy nominate non-root norse noses not really dying notebooks notification-daemon novels november fair nuclear war numbers numix obama obligation obliviousness obscure ocz ogg oggenc olap olive omote open formats open music openness optimism orcas orchestra oreo oreos org-mode origami oscar otr overheat owen sound packing paint shedding pan pancakes panda parallelism passport patience pattern recognition pdo peace peaceful pen pence pender penguins penmanship perception perfection pet rocks physical piano pickman's model picnik pidgin plugins pikmin pintsize pipelight pirate festival pizza hut plagiarism planning plans playground playlists plumbing plushies podcast poem poetry points pokemon pomplamoose positions posse post posters postmodernism potatoes potlucks power ppc practise prejudice premier pressure pretty pride and prejudice priorities private problems processes professionalism projects promise protest proud purchases qt quarantine racism rad radeon railroad randall munroe raop rats reagan recursion recycling redhat reductionism refactoring refrigerators regret relationships release renew renfrew repairs report resizing resolutions resolve resumes reuse reuters reviews revolution rhino rhps ricola risk road trips roar robots rockwood roomba rot rtm ruby day ryu safety sanctuary sand savages scary scary movies scheduling schneier scholarships scooters scp script seals search secret world of arrietty secrets seitei self-interest self-sufficiency senescence sessions setbuilder settlers of catan sftp shame sheepo pistachio sheila patek shell shells sherlock holmes shipping shogun shotwell shoulder bag sigh sim city simafort simpsons sincerity singing sjr skill skunks sky slackware slashdot sliver small smiling snails snowboarding soccer social dance socis soft solemn someonesmotherwantstoadoptme song sony sophistication sorbet sorrow sparklers speed speed river spell spellchecking spelling spies spilt milk splendid splinter spoilers squaresville sr sshd stanley park starry night starving steampunk storage strawberries strength structured information struggle stuff stylus sucks sugar super mario super mario land 3d superiority superstition surprise surreal sushi surrender suspense swings sympathy systems tabs tachi uchi no kurai tail coats tameshigiri tarot taxes tears technocracy teddy bears tedtalk term termcap terror the duke the fault in our stars the hulk the human league the onion theatre theory thingsidon'twanttodo tim berners-lee tim mcgraw timber timbre timeliness tin tin todo toilets tolerance tonight toomuch touch screen touchpack tour tourniquet toys trac trailer translation travel buddy treestyle view trex triumph trivia trouble trust tweak twitter tx2500 tx2617 ugly logos un dinaru underwold unemployment universe unlimited blade works updates upgrades uploading urban agriculture urban ecology urchins vagrancy vagrant vague but exciting valadoc values vampires vanilla ice variety vegetables velvet burger verb version control vi vinegar violence voip vulnerable waf wandering wanting war warm weapons web hosting webcomic webcomics webfonts werewolves what a wonderful town whatsbetter whic are also lazer powered white spot wifi wii u wikisource will williams wings wisdom wishes wizardry wolf wonderland wordplay words world cup world water day writing voice xenophobia xephyr xinput xkcd xpath yahoo yay z-index

Blog Archive

About Me

My Photo

I am aeronautical, vanship-style.  I am olympic and mythical.  I rest on my laurels.