AttributeError: 'NoneType' object has no attribute 'write' during git import

Bug #808035 reported by Stéphane Marguet
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Jelmer Vernooij

Bug Description

Don't really know if a bug in bzr-git or anything else, but since 28/06/2011 the import of midori git fail.
http://launchpadlibrarian.net/74864009/vcs-imports-midori-master.log

I did a git clone to check and it's running ok.

Traceback (most recent call last):
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/scripts/code-import-worker.py", line 82, in <module>
    sys.exit(script.main())
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/scripts/code-import-worker.py", line 77, in main
    return import_worker.run()
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/lib/lp/codehosting/codeimport/worker.py", line 483, in run
    return self._doImport()
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/lib/lp/codehosting/codeimport/worker.py", line 650, in _doImport
    self.pushBazaarBranch(bazaar_branch)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/lib/lp/codehosting/codeimport/worker.py", line 719, in pushBazaarBranch
    self, bazaar_branch)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/lib/lp/codehosting/codeimport/worker.py", line 451, in pushBazaarBranch
    self.required_format)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/lib/lp/codehosting/codeimport/worker.py", line 160, in push
    pull_result = remote_branch.pull(bzr_branch, overwrite=True)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/branch.py", line 1089, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "<string>", line 4, in pull_write_locked
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/branch.py", line 3483, in pull
    merge_tags_to_master=not source_is_master)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/branch.py", line 3593, in _pull
    overwrite=overwrite, graph=graph)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/branch.py", line 1038, in update_revisions
    overwrite, graph)
  File "<string>", line 4, in update_revisions_write_locked
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/branch.py", line 3435, in update_revisions
    self.target.fetch(self.source, stop_revision)
  File "<string>", line 4, in fetch_write_locked
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/branch.py", line 687, in fetch
    pb=pb)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/repository.py", line 1781, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "<string>", line 4, in fetch_write_locked
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/repository.py", line 3432, in fetch
    to_format=self.target._format)
  File "/srv/importd.launchpad.net/production/launchpad-rev-13376/eggs/bzr-2.3.3-py2.6-linux-x86_64.egg/bzrlib/ui/text.py", line 264, in show_user_warning
    self.stderr.write(self.format_user_warning(warning_id, message_args) +
AttributeError: 'NoneType' object has no attribute 'write'

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

It looks like Launchpad has somehow got a bzr ui object with stderr=None.

summary: - Git import to Bzr fail since 2011-06-28
+ AttributeError: 'NoneType' object has no attribute 'write' during git
+ import
description: updated
Changed in launchpad:
status: New → Triaged
importance: Undecided → Critical
tags: added: oem-services
tags: added: regression
Jelmer Vernooij (jelmer)
Changed in launchpad:
assignee: nobody → Jelmer Vernooij (jelmer)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 808035] Re: AttributeError: 'NoneType' object has no attribute 'write' during git import

Hi William,

On Fri, 2011-07-29 at 04:20 +0000, Launchpad QA Bot wrote:
> Fixed in stable r13553 <http://bazaar.launchpad.net/~launchpad-
> pqm/launchpad/stable/revision/13553>.
>
> ** Tags added: qa-needstesting
I had a look at QA'ing this together with Stefan on Friday, but we
couldn't find the directory on strawberry where the code import branches
are kept.

Do you remember what you did last time to get some existing code import
branches to strawberry for QA?

Cheers,

Jelmer

Revision history for this message
William Grant (wgrant) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I mentioned strawberry because that's where we expected to find the config file with the right bazaar_branch_store location, as it is the importd slave that is used.

Thanks for the pointer, I'll ask about importing to tellurium when I retry the QA tomorrow.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This doesn't fully fix upgrades, although it does fix the use of show_user_warning. I'm marking it as qa-ok, since it doesn't make the current situation any worse, only slightly better.

QA has revealed that there are more issues with LoggingUIFactory not implementing the full UIFactory interface. I'm going to extend the testsuite and ensure there is full coverage.

tags: added: qa-ok
removed: qa-needstesting
Benji York (benji)
Changed in launchpad:
status: Fix Committed → Fix Released
Revision history for this message
Stéphane Marguet (stemp) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The error is slightly different, but this fix isn't complete. https://code.launchpad.net/~jelmer/launchpad/logginguifactory-fixes/+merge/70144 has the followup fix.

Changed in launchpad:
status: Fix Released → In Progress
tags: removed: qa-ok
William Grant (wgrant)
tags: added: qa-ok
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This has finally been fixed.

Changed in launchpad:
status: In Progress → Fix Released
tags: added: critical-analysis
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

DId I understand correctly that this regression was introduced in revision 13158 when we upgraded from bzr 2.2.2 to 2.3.3 (and I assume changes in the UIFactory interface broke our subclass)?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Francis,

Yes, that's correct. This only happened for existing imports that were in an older bzr format, which is probably why it wasn't noticed during QA.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.