[fastimport 3.0.2] TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Breezy |
Fix Released
|
Undecided
|
Unassigned | ||
python-fastimport (Ubuntu) |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Tried to fast-import a git repository to brz but failed:(
```
root@first:
git version 2.17.1
root@first:
root@first:
brz: ERROR: AttributeError: 'NoneType' object has no attribute '_transport'
Traceback (most recent call last):
File "/usr/local/
return the_callable(*args, **kwargs)
File "/usr/local/
ret = run(*run_argv)
File "/usr/local/
return self.run(
File "/usr/local/
return self._operation
File "/usr/local/
self.cleanups, self.func, *args, **kwargs)
File "/usr/local/
result = func(*args, **kwargs)
File "/usr/local/
user_
File "/usr/local/
return proc.process(
File "/usr/local/
super(
File "build/
self.
File "/usr/local/
self.
File "/usr/local/
repo_transport = self.repo.
AttributeError: 'NoneType' object has no attribute '_transport'
brz 3.0.2 on python 2.7.15 (Linux-
Ubuntu-
arguments: ['/usr/
plugins: bash_completion
commitfromn
fastimport[
netrc_
propose[3.0.2], repodebug[3.0.2], stats[3.0.2], upload[3.0.2],
weave_
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'C.UTF-8'
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.
```
Related branches
- Jelmer Vernooij: Approve
-
Diff: 30 lines (+4/-4)2 files modifiedbreezy/plugins/fastimport/processors/generic_processor.py (+1/-4)
doc/en/release-notes/brz-3.0.txt (+3/-0)
affects: | brz → breezy (Ubuntu) |
Changed in breezy (Ubuntu): | |
status: | New → Confirmed |
Changed in brz: | |
status: | New → In Progress |
Changed in python-fastimport (Ubuntu): | |
status: | Confirmed → Fix Committed |
Heh, turns out it doesn't work under Python3 either, though naturally the specific error is different. This is what I'm encountering
...
$ git fast-export --tag-of- filtered- object= rewrite --signed-tags=strip --all > debian.fi
$ brz fast-import debian.fi ../xtables- addons/ debian
brz: ERROR: TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last): lib/python3. 7/dist- packages/ breezy/ commands. py", line 1016, in exception_ to_return_ code lib/python3. 7/dist- packages/ breezy/ commands. py", line 1202, in run_bzr lib/python3. 7/dist- packages/ breezy/ commands. py", line 759, in run_argv_aliases **all_cmd_ args) lib/python3. 7/dist- packages/ breezy/ commands. py", line 784, in run .run_simple( *args, **kwargs) lib/python3. 7/dist- packages/ breezy/ cleanup. py", line 137, in run_simple lib/python3. 7/dist- packages/ breezy/ cleanup. py", line 166, in _do_with_cleanups lib/python3. 7/dist- packages/ breezy/ plugins/ fastimport/ cmds.py" , line 304, in run info(source) lib/python3. 7/dist- packages/ breezy/ plugins/ fastimport/ cmds.py" , line 336, in _generate_info p.iter_ commands) python3/ dist-packages/ fastimport/ processor. py", line 75, in process _process( command_ iter) python3/ dist-packages/ fastimport/ processor. py", line 87, in _process python3/ dist-packages/ fastimport/ processors/ info_processor. py", line 241, in reset_handler startswith( 'refs/tags/ '):
File "/usr/local/
return the_callable(*args, **kwargs)
File "/usr/local/
ret = run(*run_argv)
File "/usr/local/
return self.run(
File "/usr/local/
return self._operation
File "/usr/local/
self.cleanups, self.func, *args, **kwargs)
File "/usr/local/
result = func(*args, **kwargs)
File "/usr/local/
info = self._generate_
File "/usr/local/
return_code = proc.process(
File "/usr/lib/
self.
File "/usr/lib/
handler(self, cmd)
File "/usr/lib/
if cmd.ref.
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
...
Breezy (brz) 3.0.2 3.0-23- generic- x86_64- with-Ubuntu- 19.10-eoan
Python interpreter: /usr/bin/python3.7 3.7.5
Python standard library: /usr/lib/python3.7
Platform: Linux-5.