I'm having trouble discerning if that is the issue. I am including the full block of code with the preceding portion that generates key_urls: for key, props in manifest['paths'].items(): txid = props['id'] file_txids[key] = txid self._debug(f'{key}: {self.gateway}/{txid}') if self.combining.get(key, False): for url in (*self.txid_urls(txid), *self.txid_uris(txid)): key_urls.append((key, url)) if self.closed: key_urls = '\n'.join((' '.join(keyurl) for keyurl in key_urls)) result = subprocess.run( ('git', 'annex', 'registerurl', '--batch'), input=keyurls, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True, text=True ) for line in result.stdout: self._debug(line) for line in result.stderr: self._info(line)