volitank / nala

Nala is a front-end for libapt-pkg.
GNU General Public License v3.0
1.33k stars 49 forks source link

`InvalidURL`: Invalid non-printable ASCII character in URL #33

Open Aviksaikat opened 5 months ago

Aviksaikat commented 5 months ago

Summary

Hi, I got InvalidURL: Invalid non-printable ASCII character in URL when I ran sudo nala update && sudo nala dist-upgrade -y.

System

Linux kali 6.5.0-kali3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.6-1kali1 (2023-10-09) x86_64 GNU/Linux

Output

╭─ Downloading… ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Total Packages: 0/364                                                                                                                                      │
│ Starting Downloads…                                                                                                                                        │
│ Time Remaining: -:--:-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0.0/229.5 MB • ? │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/lib/python3/dist-packages/nala/nala.py:275 in dist_upgrade                                  │
│                                                                                                  │
│   272 ) -> None:                                                                                 │
│   273 │   """Upgrade alias."""                                                                   │
│   274 │   arguments.full_upgrade = True                                                          │
│ ❱ 275 │   upgrade(                                                                               │
│   276 │   │   exclude,                                                                           │
│   277 │   │   purge,                                                                             │
│   278 │   │   debug,                                                                             │
│                                                                                                  │
│ ╭───────── locals ──────────╮                                                                    │
│ │         assume_yes = None │                                                                    │
│ │        auto_remove = None │                                                                    │
│ │              debug = None │                                                                    │
│ │      download_only = None │                                                                    │
│ │        dpkg_option = []   │                                                                    │
│ │            exclude = []   │                                                                    │
│ │         fix_broken = None │                                                                    │
│ │       full_upgrade = None │                                                                    │
│ │ install_recommends = None │                                                                    │
│ │   install_suggests = None │                                                                    │
│ │           man_help = None │                                                                    │
│ │              purge = None │                                                                    │
│ │           raw_dpkg = None │                                                                    │
│ │   remove_essential = None │                                                                    │
│ │             simple = None │                                                                    │
│ │             update = None │                                                                    │
│ │            verbose = None │                                                                    │
│ ╰───────────────────────────╯                                                                    │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/nala.py:384 in upgrade                                       │
│                                                                                                  │
│   381 │   │   auto_remover(cache, nala_pkgs)                                                     │
│   382 │   │   get_changes(cache, nala_pkgs, "upgrade")                                           │
│   383 │                                                                                          │
│ ❱ 384 │   _upgrade(exclude)                                                                      │
│   385                                                                                            │
│   386                                                                                            │
│   387 @nala.command(help=_("Install packages."))                                                 │
│                                                                                                  │
│ ╭────────────────────────────────── locals ───────────────────────────────────╮                  │
│ │           _upgrade = <function upgrade.<locals>._upgrade at 0x7f82a3363420> │                  │
│ │         assume_yes = None                                                   │                  │
│ │        auto_remove = None                                                   │                  │
│ │              debug = None                                                   │                  │
│ │      download_only = None                                                   │                  │
│ │        dpkg_option = []                                                     │                  │
│ │            exclude = []                                                     │                  │
│ │         fix_broken = None                                                   │                  │
│ │       full_upgrade = None                                                   │                  │
│ │ install_recommends = None                                                   │                  │
│ │   install_suggests = None                                                   │                  │
│ │           man_help = None                                                   │                  │
│ │              purge = None                                                   │                  │
│ │           raw_dpkg = None                                                   │                  │
│ │   remove_essential = None                                                   │                  │
│ │             simple = None                                                   │                  │
│ │             update = None                                                   │                  │
│ │            verbose = None                                                   │                  │
│ ╰─────────────────────────────────────────────────────────────────────────────╯                  │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/nala.py:382 in _upgrade                                      │
│                                                                                                  │
│   379 │   │   │   )                                                                              │
│   380 │   │                                                                                      │
│   381 │   │   auto_remover(cache, nala_pkgs)                                                     │
│ ❱ 382 │   │   get_changes(cache, nala_pkgs, "upgrade")                                           │
│   383 │                                                                                          │
│   384 │   _upgrade(exclude)                                                                      │
│   385                                                                                            │
│                                                                                                  │
│ ╭───────────────────────────────────── locals ──────────────────────────────────────╮            │
│ │     _upgrade = <function upgrade.<locals>._upgrade at 0x7f82a3363420>             │            │
│ │        cache = <nala.cache.Cache object at 0x7f82a3367fb0>                        │            │
│ │         cand = <Version: package:'megasync' version:'4.11.0-3.1'>                 │            │
│ │      exclude = []                                                                 │            │
│ │   is_upgrade = (                                                                  │            │
│ │                │   <Package: name:'accountsservice' architecture='amd64' id:384>, │            │
│ │                │   <Package: name:'adwaita-qt' architecture='amd64' id:700>,      │            │
│ │                │   <Package: name:'apache2' architecture='amd64' id:591>,         │            │
│ │                │   <Package: name:'apache2-bin' architecture='amd64' id:1682>,    │            │
│ │                │   <Package: name:'apache2-utils' architecture='amd64' id:1684>,  │            │
│ │                │   <Package: name:'apparmor' architecture='amd64' id:1969>,       │            │
│ │                │   <Package: name:'aria2' architecture='amd64' id:1492>,          │            │
│ │                │   <Package: name:'aspell' architecture='amd64' id:1094>,         │            │
│ │                │   <Package: name:'at-spi2-core' architecture='amd64' id:3117>,   │            │
│ │                │   <Package: name:'avahi-daemon' architecture='amd64' id:2088>,   │            │
│ │                │   ... +355                                                       │            │
│ │                )                                                                  │            │
│ │ nested_cache = None                                                               │            │
│ │          pkg = <Package: name:'xxd' architecture='amd64' id:10801>                │            │
│ │    protected = set()                                                              │            │
│ │     versions = <VersionList: ['4.11.0-3.1', '4.9.4-3.1']>                         │            │
│ ╰───────────────────────────────────────────────────────────────────────────────────╯            │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/install.py:411 in get_changes                                │
│                                                                                                  │
│    408 │   if arguments.raw_dpkg:                                                                │
│    409 │   │   term.restore_locale()                                                             │
│    410 │                                                                                         │
│ ❱  411 │   download_pkgs(pkgs)                                                                   │
│    412 │   write_history(cache, nala_pkgs, operation)                                            │
│    413 │   start_dpkg(cache, nala_pkgs)                                                          │
│    414                                                                                           │
│                                                                                                  │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮               │
│ │     cache = <nala.cache.Cache object at 0x7f82a3367fb0>                        │               │
│ │ nala_pkgs = PackageHandler(                                                    │               │
│ │             │   autoremoved={'libappstreamqt2'},                               │               │
│ │             │   user_explicit=[],                                              │               │
│ │             │   local_debs=[],                                                 │               │
│ │             │   not_needed=[],                                                 │               │
│ │             │   delete_pkgs=[],                                                │               │
│ │             │   install_pkgs=[],                                               │               │
│ │             │   reinstall_pkgs=[],                                             │               │
│ │             │   upgrade_pkgs=[                                                 │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='accountsservice',                                │               │
│ │             │   │   │   version='23.13.9-5+b1',                                │               │
│ │             │   │   │   size=89404,                                            │               │
│ │             │   │   │   old_version='23.13.9-5'                                │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='adwaita-qt',                                     │               │
│ │             │   │   │   version='1.4.2-3+b1',                                  │               │
│ │             │   │   │   size=93000,                                            │               │
│ │             │   │   │   old_version='1.4.2-3'                                  │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='apache2',                                        │               │
│ │             │   │   │   version='2.4.58-1+b1',                                 │               │
│ │             │   │   │   size=212452,                                           │               │
│ │             │   │   │   old_version='2.4.58-1'                                 │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='apache2-bin',                                    │               │
│ │             │   │   │   version='2.4.58-1+b1',                                 │               │
│ │             │   │   │   size=1375452,                                          │               │
│ │             │   │   │   old_version='2.4.58-1'                                 │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='apache2-utils',                                  │               │
│ │             │   │   │   version='2.4.58-1+b1',                                 │               │
│ │             │   │   │   size=205060,                                           │               │
│ │             │   │   │   old_version='2.4.58-1'                                 │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='apparmor',                                       │               │
│ │             │   │   │   version='3.0.12-1+b2',                                 │               │
│ │             │   │   │   size=627988,                                           │               │
│ │             │   │   │   old_version='3.0.12-1+b1'                              │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='aria2',                                          │               │
│ │             │   │   │   version='1.37.0+debian-1+b1',                          │               │
│ │             │   │   │   size=369436,                                           │               │
│ │             │   │   │   old_version='1.37.0+debian-1'                          │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='aspell',                                         │               │
│ │             │   │   │   version='0.60.8.1-1+b1',                               │               │
│ │             │   │   │   size=273172,                                           │               │
│ │             │   │   │   old_version='0.60.8.1-1'                               │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='at-spi2-core',                                   │               │
│ │             │   │   │   version='2.50.0-1+b1',                                 │               │
│ │             │   │   │   size=59752,                                            │               │
│ │             │   │   │   old_version='2.50.0-1'                                 │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='avahi-daemon',                                   │               │
│ │             │   │   │   version='0.8-13+b1',                                   │               │
│ │             │   │   │   size=84468,                                            │               │
│ │             │   │   │   old_version='0.8-13'                                   │               │
│ │             │   │   ),                                                         │               │
│ │             │   │   ... +354                                                   │               │
│ │             │   ],                                                             │               │
│ │             │   autoremove_pkgs=[                                              │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='libappstreamqt2',                                │               │
│ │             │   │   │   version='0.16.4-1',                                    │               │
│ │             │   │   │   size=354304,                                           │               │
│ │             │   │   │   old_version=None                                       │               │
│ │             │   │   )                                                          │               │
│ │             │   ],                                                             │               │
│ │             │   autoremove_config=[],                                          │               │
│ │             │   delete_config=[],                                              │               │
│ │             │   recommend_pkgs=[],                                             │               │
│ │             │   suggest_pkgs=[],                                               │               │
│ │             │   configure_pkgs=[],                                             │               │
│ │             │   downgrade_pkgs=[],                                             │               │
│ │             │   held_pkgs=[                                                    │               │
│ │             │   │   NalaPackage(                                               │               │
│ │             │   │   │   name='megasync',                                       │               │
│ │             │   │   │   version='4.11.0-3.1',                                  │               │
│ │             │   │   │   size=55152640,                                         │               │
│ │             │   │   │   old_version='4.9.4-3.1'                                │               │
│ │             │   │   )                                                          │               │
│ │             │   ]                                                              │               │
│ │             )                                                                  │               │
│ │ operation = 'upgrade'                                                          │               │
│ │      pkgs = [                                                                  │               │
│ │             │   <Package: name:'accountsservice' architecture='amd64' id:384>, │               │
│ │             │   <Package: name:'adwaita-qt' architecture='amd64' id:700>,      │               │
│ │             │   <Package: name:'apache2' architecture='amd64' id:591>,         │               │
│ │             │   <Package: name:'apache2-bin' architecture='amd64' id:1682>,    │               │
│ │             │   <Package: name:'apache2-utils' architecture='amd64' id:1684>,  │               │
│ │             │   <Package: name:'apparmor' architecture='amd64' id:1969>,       │               │
│ │             │   <Package: name:'aria2' architecture='amd64' id:1492>,          │               │
│ │             │   <Package: name:'aspell' architecture='amd64' id:1094>,         │               │
│ │             │   <Package: name:'at-spi2-core' architecture='amd64' id:3117>,   │               │
│ │             │   <Package: name:'avahi-daemon' architecture='amd64' id:2088>,   │               │
│ │             │   ... +355                                                       │               │
│ │             ]                                                                  │               │
│ ╰────────────────────────────────────────────────────────────────────────────────╯               │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/downloader.py:911 in download_pkgs                           │
│                                                                                                  │
│   908                                                                                            │
│   909 def download_pkgs(pkgs: Iterable[Package]) -> None:                                        │
│   910 │   """Download package from a list of pkgs."""                                            │
│ ❱ 911 │   download(                                                                              │
│   912 │   │   Downloader(                                                                        │
│   913 │   │   │   # Start the larger files first, as they take the longest                       │
│   914 │   │   │   sorted(                                                                        │
│                                                                                                  │
│ ╭───────────────────────────────── locals ──────────────────────────────────╮                    │
│ │ pkgs = [                                                                  │                    │
│ │        │   <Package: name:'accountsservice' architecture='amd64' id:384>, │                    │
│ │        │   <Package: name:'adwaita-qt' architecture='amd64' id:700>,      │                    │
│ │        │   <Package: name:'apache2' architecture='amd64' id:591>,         │                    │
│ │        │   <Package: name:'apache2-bin' architecture='amd64' id:1682>,    │                    │
│ │        │   <Package: name:'apache2-utils' architecture='amd64' id:1684>,  │                    │
│ │        │   <Package: name:'apparmor' architecture='amd64' id:1969>,       │                    │
│ │        │   <Package: name:'aria2' architecture='amd64' id:1492>,          │                    │
│ │        │   <Package: name:'aspell' architecture='amd64' id:1094>,         │                    │
│ │        │   <Package: name:'at-spi2-core' architecture='amd64' id:3117>,   │                    │
│ │        │   <Package: name:'avahi-daemon' architecture='amd64' id:2088>,   │                    │
│ │        │   ... +355                                                       │                    │
│ │        ]                                                                  │                    │
│ ╰───────────────────────────────────────────────────────────────────────────╯                    │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/downloader.py:878 in download                                │
│                                                                                                  │
│   875 │   Does not return if in Download Only mode.                                              │
│   876 │   """                                                                                    │
│   877 │   try:                                                                                   │
│ ❱ 878 │   │   run(downloader.start_download())                                                   │
│   879 │   except (CancelledError, RuntimeError) as error:                                        │
│   880 │   │   if downloader.exit:                                                                │
│   881 │   │   │   sys.exit(downloader.exit)                                                      │
│                                                                                                  │
│ ╭────────────────────────────── locals ──────────────────────────────╮                           │
│ │ downloader = <nala.downloader.Downloader object at 0x7f82a3348d70> │                           │
│ ╰────────────────────────────────────────────────────────────────────╯                           │
│                                                                                                  │
│ /usr/lib/python3.12/asyncio/runners.py:194 in run                                                │
│                                                                                                  │
│   191 │   │   │   "asyncio.run() cannot be called from a running event loop")                    │
│   192 │                                                                                          │
│   193 │   with Runner(debug=debug, loop_factory=loop_factory) as runner:                         │
│ ❱ 194 │   │   return runner.run(main)                                                            │
│   195                                                                                            │
│   196                                                                                            │
│   197 def _cancel_all_tasks(loop):                                                               │
│                                                                                                  │
│ ╭─────────────────────────────────── locals ────────────────────────────────────╮                │
│ │        debug = None                                                           │                │
│ │ loop_factory = None                                                           │                │
│ │         main = <coroutine object Downloader.start_download at 0x7f82a3482320> │                │
│ │       runner = <asyncio.runners.Runner object at 0x7f82a410cd40>              │                │
│ ╰───────────────────────────────────────────────────────────────────────────────╯                │
│                                                                                                  │
│ /usr/lib/python3.12/asyncio/runners.py:118 in run                                                │
│                                                                                                  │
│   115 │   │                                                                                      │
│   116 │   │   self._interrupt_count = 0                                                          │
│   117 │   │   try:                                                                               │
│ ❱ 118 │   │   │   return self._loop.run_until_complete(task)                                     │
│   119 │   │   except exceptions.CancelledError:                                                  │
│   120 │   │   │   if self._interrupt_count > 0:                                                  │
│   121 │   │   │   │   uncancel = getattr(task, "uncancel", None)                                 │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │        context = <_contextvars.Context object at 0x7f82a34a5880>                             │ │
│ │           coro = <coroutine object Downloader.start_download at 0x7f82a3482320>              │ │
│ │           self = <asyncio.runners.Runner object at 0x7f82a410cd40>                           │ │
│ │ sigint_handler = functools.partial(<bound method Runner._on_sigint of                        │ │
│ │                  <asyncio.runners.Runner object at 0x7f82a410cd40>>, main_task=<Task         │ │
│ │                  finished name='Task-1' coro=<Downloader.start_download() done, defined at   │ │
│ │                  /usr/lib/python3/dist-packages/nala/downloader.py:399>                      │ │
│ │                  exception=InvalidURL('Invalid non-printable ASCII character in URL')>)      │ │
│ │           task = <Task finished name='Task-1' coro=<Downloader.start_download() done,        │ │
│ │                  defined at /usr/lib/python3/dist-packages/nala/downloader.py:399>           │ │
│ │                  exception=InvalidURL('Invalid non-printable ASCII character in URL')>       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3.12/asyncio/base_events.py:684 in run_until_complete                             │
│                                                                                                  │
│    681 │   │   if not future.done():                                                             │
│    682 │   │   │   raise RuntimeError('Event loop stopped before Future completed.')             │
│    683 │   │                                                                                     │
│ ❱  684 │   │   return future.result()                                                            │
│    685 │                                                                                         │
│    686 │   def stop(self):                                                                       │
│    687 │   │   """Stop running the event loop.                                                   │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │   future = <Task finished name='Task-1' coro=<Downloader.start_download() done, defined at   │ │
│ │            /usr/lib/python3/dist-packages/nala/downloader.py:399>                            │ │
│ │            exception=InvalidURL('Invalid non-printable ASCII character in URL')>             │ │
│ │ new_task = False                                                                             │ │
│ │     self = <_UnixSelectorEventLoop running=False closed=True debug=False>                    │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/downloader.py:423 in start_download                          │
│                                                                                                  │
│   420 │   │   │   │   │   exit_func = partial(self.interrupt, signal_enum, loop)                 │
│   421 │   │   │   │   │   loop.add_signal_handler(signal_enum, exit_func)                        │
│   422 │   │   │   │                                                                              │
│ ❱ 423 │   │   │   │   return all(await gather(*tasks))                                           │
│   424 │                                                                                          │
│   425 │   async def _init_download(self, client: AsyncClient, urls: URLSet) -> None:             │
│   426 │   │   """Download pkgs."""                                                               │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │      client = <httpx.AsyncClient object at 0x7f829e153350>                                   │ │
│ │   exit_func = functools.partial(<bound method Downloader.interrupt of                        │ │
│ │               <nala.downloader.Downloader object at 0x7f82a3348d70>>, <Signals.SIGTERM: 15>, │ │
│ │               <_UnixSelectorEventLoop running=False closed=True debug=False>)                │ │
│ │        loop = <_UnixSelectorEventLoop running=False closed=True debug=False>                 │ │
│ │        self = <nala.downloader.Downloader object at 0x7f82a3348d70>                          │ │
│ │ signal_enum = <Signals.SIGTERM: 15>                                                          │ │
│ │       tasks = <generator object Downloader.start_download.<locals>.<genexpr> at              │ │
│ │               0x7f829e07e340>                                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/downloader.py:432 in _init_download                          │
│                                                                                                  │
│   429 │   │   │   │   if not (domain := await self._check_count(url.uri)):                       │
│   430 │   │   │   │   │   continue                                                               │
│   431 │   │   │   │   try:                                                                       │
│ ❱ 432 │   │   │   │   │   await self._download(client, url)                                      │
│   433 │   │   │   │   │                                                                          │
│   434 │   │   │   │   │   post_download_check(url)                                               │
│   435                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ client = <httpx.AsyncClient object at 0x7f829e153350>                                        │ │
│ │ domain = 'https://repo.expressvpn.com/public'                                                │ │
│ │   self = <nala.downloader.Downloader object at 0x7f82a3348d70>                               │ │
│ │    url = URL(                                                                                │ │
│ │          │                                                                                   │ │
│ │          uri='https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-version/ma… │ │
│ │          │   size=22658444,                                                                  │ │
│ │          │   path=PosixPath('/var/cache/apt/archives/expressvpn_3.61.0.12-1_amd64.deb'),     │ │
│ │          │   proto='',                                                                       │ │
│ │          │   hash_type='sha256',                                                             │ │
│ │          │   hash='fc62e742bca1068f94781555ed9426dd4df7f7df8fed3f818317b00e13b21ac8',        │ │
│ │          │   failed=False,                                                                   │ │
│ │          │   no_hash=False                                                                   │ │
│ │          )                                                                                   │ │
│ │   urls = [                                                                                   │ │
│ │          │   URL(                                                                            │ │
│ │          │   │                                                                               │ │
│ │          uri='https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-version/ma… │ │
│ │          │   │   size=22658444,                                                              │ │
│ │          │   │   path=PosixPath('/var/cache/apt/archives/expressvpn_3.61.0.12-1_amd64.deb'), │ │
│ │          │   │   proto='',                                                                   │ │
│ │          │   │   hash_type='sha256',                                                         │ │
│ │          │   │   hash='fc62e742bca1068f94781555ed9426dd4df7f7df8fed3f818317b00e13b21ac8',    │ │
│ │          │   │   failed=False,                                                               │ │
│ │          │   │   no_hash=False                                                               │ │
│ │          │   ),                                                                              │ │
│ │          │   URL(                                                                            │ │
│ │          │   │                                                                               │ │
│ │          uri='https://dl.cloudsmith.io/public/expressvpn/linux/deb/debian/pool/any-version/… │ │
│ │          │   │   size=22658444,                                                              │ │
│ │          │   │   path=PosixPath('/var/cache/apt/archives/expressvpn_3.61.0.12-1_amd64.deb'), │ │
│ │          │   │   proto='',                                                                   │ │
│ │          │   │   hash_type='sha256',                                                         │ │
│ │          │   │   hash='fc62e742bca1068f94781555ed9426dd4df7f7df8fed3f818317b00e13b21ac8',    │ │
│ │          │   │   failed=False,                                                               │ │
│ │          │   │   no_hash=False                                                               │ │
│ │          │   )                                                                               │ │
│ │          ]                                                                                   │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/nala/downloader.py:465 in _download                               │
│                                                                                                  │
│   462 │   │   │   total_data = 0                                                                 │
│   463 │   │   │   hash_fun = hashlib.new(url.hash_type)                                          │
│   464 │   │   │   try:                                                                           │
│ ❱ 465 │   │   │   │   async with client.stream("GET", url.uri) as response:                      │
│   466 │   │   │   │   │   response.raise_for_status()                                            │
│   467 │   │   │   │   │   async with await open_file(dest, mode="wb") as file:                   │
│   468 │   │   │   │   │   │   async for data in response.aiter_bytes():                          │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │         client = <httpx.AsyncClient object at 0x7f829e153350>                                │ │
│ │           dest = PosixPath('/var/cache/apt/archives/partial/expressvpn_3.61.0.12-1_amd64.de… │ │
│ │       hash_fun = <sha256 _hashlib.HASH object @ 0x7f829e0a4f10>                              │ │
│ │ second_attempt = False                                                                       │ │
│ │           self = <nala.downloader.Downloader object at 0x7f82a3348d70>                       │ │
│ │     total_data = 0                                                                           │ │
│ │            url = URL(                                                                        │ │
│ │                  │                                                                           │ │
│ │                  uri='https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-ve… │ │
│ │                  │   size=22658444,                                                          │ │
│ │                  │                                                                           │ │
│ │                  path=PosixPath('/var/cache/apt/archives/expressvpn_3.61.0.12-1_amd64.deb'), │ │
│ │                  │   proto='',                                                               │ │
│ │                  │   hash_type='sha256',                                                     │ │
│ │                  │                                                                           │ │
│ │                  hash='fc62e742bca1068f94781555ed9426dd4df7f7df8fed3f818317b00e13b21ac8',    │ │
│ │                  │   failed=False,                                                           │ │
│ │                  │   no_hash=False                                                           │ │
│ │                  )                                                                           │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3.12/contextlib.py:210 in __aenter__                                              │
│                                                                                                  │
│   207 │   │   # they are only needed for recreation, which is not possible anymore               │
│   208 │   │   del self.args, self.kwds, self.func                                                │
│   209 │   │   try:                                                                               │
│ ❱ 210 │   │   │   return await anext(self.gen)                                                   │
│   211 │   │   except StopAsyncIteration:                                                         │
│   212 │   │   │   raise RuntimeError("generator didn't yield") from None                         │
│   213                                                                                            │
│                                                                                                  │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮                   │
│ │ self = <contextlib._AsyncGeneratorContextManager object at 0x7f829e0c5820> │                   │
│ ╰────────────────────────────────────────────────────────────────────────────╯                   │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/httpx/_client.py:1589 in stream                                   │
│                                                                                                  │
│   1586 │   │                                                                                     │
│   1587 │   │   [0]: /quickstart#streaming-responses                                              │
│   1588 │   │   """                                                                               │
│ ❱ 1589 │   │   request = self.build_request(                                                     │
│   1590 │   │   │   method=method,                                                                │
│   1591 │   │   │   url=url,                                                                      │
│   1592 │   │   │   content=content,                                                              │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │             auth = <httpx._client.UseClientDefault object at 0x7f82a39a4320>                 │ │
│ │          content = None                                                                      │ │
│ │          cookies = None                                                                      │ │
│ │             data = None                                                                      │ │
│ │       extensions = None                                                                      │ │
│ │            files = None                                                                      │ │
│ │ follow_redirects = <httpx._client.UseClientDefault object at 0x7f82a39a4320>                 │ │
│ │          headers = None                                                                      │ │
│ │             json = None                                                                      │ │
│ │           method = 'GET'                                                                     │ │
│ │           params = None                                                                      │ │
│ │             self = <httpx.AsyncClient object at 0x7f829e153350>                              │ │
│ │          timeout = <httpx._client.UseClientDefault object at 0x7f82a39a4320>                 │ │
│ │              url = 'https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-vers… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/httpx/_client.py:347 in build_request                             │
│                                                                                                  │
│    344 │   │                                                                                     │
│    345 │   │   [0]: /advanced/#request-instances                                                 │
│    346 │   │   """                                                                               │
│ ❱  347 │   │   url = self._merge_url(url)                                                        │
│    348 │   │   headers = self._merge_headers(headers)                                            │
│    349 │   │   cookies = self._merge_cookies(cookies)                                            │
│    350 │   │   params = self._merge_queryparams(params)                                          │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │    content = None                                                                            │ │
│ │    cookies = None                                                                            │ │
│ │       data = None                                                                            │ │
│ │ extensions = None                                                                            │ │
│ │      files = None                                                                            │ │
│ │    headers = None                                                                            │ │
│ │       json = None                                                                            │ │
│ │     method = 'GET'                                                                           │ │
│ │     params = None                                                                            │ │
│ │       self = <httpx.AsyncClient object at 0x7f829e153350>                                    │ │
│ │    timeout = <httpx._client.UseClientDefault object at 0x7f82a39a4320>                       │ │
│ │        url = 'https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-version/ma… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/httpx/_client.py:377 in _merge_url                                │
│                                                                                                  │
│    374 │   │   Merge a URL argument together with any 'base_url' on the client,                  │
│    375 │   │   to create the URL used for the outgoing request.                                  │
│    376 │   │   """                                                                               │
│ ❱  377 │   │   merge_url = URL(url)                                                              │
│    378 │   │   if merge_url.is_relative_url:                                                     │
│    379 │   │   │   # To merge URLs we always append to the base URL. To get this                 │
│    380 │   │   │   # behaviour correct we always ensure the base URL ends in a '/'               │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ self = <httpx.AsyncClient object at 0x7f829e153350>                                          │ │
│ │  url = 'https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-version/main/e'+… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/httpx/_urls.py:115 in __init__                                    │
│                                                                                                  │
│   112 │   │   │   │   kwargs["query"] = None if not params else str(QueryParams(params))         │
│   113 │   │                                                                                      │
│   114 │   │   if isinstance(url, str):                                                           │
│ ❱ 115 │   │   │   self._uri_reference = urlparse(url, **kwargs)                                  │
│   116 │   │   elif isinstance(url, URL):                                                         │
│   117 │   │   │   self._uri_reference = url._uri_reference.copy_with(**kwargs)                   │
│   118 │   │   else:                                                                              │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ kwargs = {}                                                                                  │ │
│ │   self = <repr-error "'URL' object has no attribute '_uri_reference'">                       │ │
│ │    url = 'https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-version/main/e… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3/dist-packages/httpx/_urlparse.py:160 in urlparse                                │
│                                                                                                  │
│   157 │   # If a URL includes any ASCII control characters including \t, \r, \n,                 │
│   158 │   # then treat it as invalid.                                                            │
│   159 │   if any(char.isascii() and not char.isprintable() for char in url):                     │
│ ❱ 160 │   │   raise InvalidURL("Invalid non-printable ASCII character in URL")                   │
│   161 │                                                                                          │
│   162 │   # Some keyword arguments require special handling.                                     │
│   163 │   # ------------------------------------------------                                     │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ kwargs = {}                                                                                  │ │
│ │    url = 'https://repo.expressvpn.com/public/deb/debian\tpriority:1/pool/any-version/main/e… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
volitank commented 5 months ago

That's weird. In the URL there is a tab \t. Could you look into your sources.list files?

/etc/apt/sources.list and then anything in /etc/apt/sources.list.d/

We need to see how they have defined their sources. Something looks wrong.

Aviksaikat commented 5 months ago

apt & apt-get is worked fine. but after that specific update nala started working fine again.

Found these that have a \t char: image

So maybe we can add some check & strip out \t ?