Alexey2022-02-11 22:17:30
Alexey, 2022-02-11 22:17:30

-1 / unknown wget unknown error?

after downloading the software, the console writes "-1 / unknown" print did not help, please tell me

import wget
import os 
from rich import print
from rich.console import Console
from rich.table import Table
from time import sleep

def dowload_file(url):
    wget.download(url, 'C:')
   # os.remove(__fisle__)
console = Console()
tasks = [f"task {n}" for n in range(1, 11)]

with console.status("[bold green]Working on tasks...") as status:
    while tasks:
        task = tasks.pop(0)
        console.log(f"{task} complete") 
def main():    
    print("\n[bold green] software downloaded to folder C [/bold green]")

if __name__ == '__main__':
    input('Press ENTER to exit')

I did not find an alternative, how can I bypass or hide it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
shurshur, 2022-02-11

This bar function writes. The easiest way is to replace it with a fake one that does nothing and doesn't return (it seems that the library does not have its own stub for this): But in general there is no point in using the old library from 2015, it is better to learn something more modern, for example, requests.
wget.download(url, bar=lambda x,y,z:None)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question