No usable temporary directory found

后端 未结 9 1627
迷失自我
迷失自我 2020-12-14 05:51

I am trying to find a temp directory , but when i am trying to get the directory using

tempfile.gettempdir()

it\'s giving me error of

9条回答
  •  一生所求
    2020-12-14 05:54

    This kind of error occured in two case

    1. permission(should be drwxrwxrwt and owened by root)
    2. space

    To check space(disk usage)just run the command on terminal

    df -h
    

    Will list the disk usage on unix and get the output like

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda5        28G   15G   12G  58% /
    

    If the root(mounted on /) usage is 100%.

    You need to clean the tmp directory or restart the machine or make some space on the root.

提交回复
热议问题