lmontier/django-streamlit-dashboard

RuntimeWarning: Model 'annotationsdatabase.imageannotation' was already registered.

Opened this issue · 0 comments

dpinol commented

While running "streamlit run", if code is changed and browser page is reloaded, we get this error:

/home/dani/.virtualenvs/django-streamlit-dashboard-J0cV74kY/lib/python3.11/site-packages/django/db/models/base.py:364: RuntimeWarning: Model 'annotationsdatabase.imageannotation' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models.
  new_class._meta.apps.register_model(new_class._meta.app_label, new_class)

Your application still runs fine, but on my application it looks like types are duplicated because isinstance(MyDjangoModel) stops working.

thanks