Type issue in main

5 views
Skip to first unread message

Mark Hewitt

unread,
May 18, 2026, 11:03:04 AM (7 days ago) May 18
to Johannes Berg, bup list
As Johannes suggested, I noticed a type issue in the current main with a
remote bup server of a different version.

Here, I have bup main (0.34~5f9cf697b3daa3d4d6899f9366ebc1fd64161a32)
running on my test system (called disker) talking to a bup server
(bupman2). The latter is running 0.33.10.

> root@disker:/bupsys/spec# /usr/local/bin/bup
> --bup-dir=/bupsys/data/External-200/bupdata/localbup/disker.bup init
> --remote=bup@bupman2:/bupsys/data/External-200/bupdata/repository/disker
> Traceback (most recent call last):
>   File "/usr/local/lib/bup/bup/main.py", line 221, in main
>     rc = run_subcmd(cmd_module, subcmd, opt['profile'])
>   File "/usr/local/lib/bup/bup/main.py", line 178, in run_subcmd
>     return module.main(args)
>            ~~~~~~~~~~~^^^^^^
>   File "/usr/local/lib/bup/bup/cmd/init.py", line 27, in main
>     loc = main_repo_location(opt.remote, o.fatal)
>   File "/usr/local/lib/bup/bup/repo/__init__.py", line 45, in
> main_repo_location
>     url = url_for_remote_opt(remote)
>   File "/usr/local/lib/bup/bup/config.py", line 23, in url_for_remote_opt
>     url = parse_bytes_path_url(remote, require_auth=True)
>   File "/usr/local/lib/bup/bup/url.py", line 122, in parse_bytes_path_url
>     m = _scheme_and_rest_rx.fullmatch(url)
> TypeError: cannot use a bytes pattern on a string-like object

Hope that helps!

Mark

>

Rob Browning

unread,
May 19, 2026, 6:38:01 PM (6 days ago) May 19
to Mark Hewitt, Johannes Berg, bup list
Mark Hewitt <mjh.br...@gmail.com> writes:

>>     url = url_for_remote_opt(remote)
>>   File "/usr/local/lib/bup/bup/config.py", line 23, in url_for_remote_opt
>>     url = parse_bytes_path_url(remote, require_auth=True)
>>   File "/usr/local/lib/bup/bup/url.py", line 122, in parse_bytes_path_url
>>     m = _scheme_and_rest_rx.fullmatch(url)
>> TypeError: cannot use a bytes pattern on a string-like object
>
> Hope that helps!

It does. Just a bug in main (hiding another bug). I'll fix it.

Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Reply all
Reply to author
Forward
0 new messages