pimoroni / phew

MIT License
204 stars 44 forks source link

Logging Truncate not Working #47

Open Makina2 opened 1 year ago

Makina2 commented 1 year ago

Hi, I am trying to truncate log.txt by using logging.truncate (120) as in the the Kevin McLeer video. I get "TypeError: function takes 2 positional arguments but 1 were given" when I run the code.

Can anyone help please

Nikorasu commented 1 year ago

I just noticed I get an error if I'm using truncate, but the log.txt file hasn't been created yet. Also, I think you're not giving it enough arguments, gotta give it the filename too: truncate('log.txt',16384) (doubles default size)