bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.33k stars 1.46k forks source link

ResourceWarning: Enable tracemalloc to get the object allocation traceback #1413

Open josephernest opened 1 year ago

josephernest commented 1 year ago

Hi there,

Do you know what could be the reason for this message:

D:\bottle.py:2269: ResourceWarning: unclosed file <_io.BufferedReader name='D:\\test.webm'>
  func()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
wsgiref\handlers.py:183: ResourceWarning: unclosed file <_io.BufferedReader name='D:\\test.webm'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback

when I serve a HTML page containing

?

The video is loading successfully, but I'd like to remove this warning message if possible.

Thanks!

All the best

FriedrichFroebel commented 10 months ago

Have you tried enable memory tracing through tracemalloc as proposed in the warning message? Could you provide some minimal example code reproducing this issue?