Hi I am currently trying to deploy a face authentication model using retina face as the model and streamlit. This is the current streamlit link and here is the github link. I am using python 3.9 due to some specific dependencies like retina face and tensorflow 2.5.0 requiring that version, and all other requirements can be found in the github link under requirements.
When I am currently trying to deploy, I see this error right now:
Traceback (most recent call last):
File “/home/adminuser/venv/bin/streamlit”, line 5, in
from streamlit.cli import main
File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/init.py”, line 70, in
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/delta_generator.py”, line 90, in
from streamlit.elements.arrow_altair import ArrowAltairMixin
File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/elements/arrow_altair.py”, line 25, in
import altair as alt
File “/home/adminuser/venv/lib/python3.9/site-packages/altair/init.py”, line 4, in
from .vegalite import *
File “/home/adminuser/venv/lib/python3.9/site-packages/altair/vegalite/init.py”, line 2, in
from .v4 import *
File “/home/adminuser/venv/lib/python3.9/site-packages/altair/vegalite/v4/init.py”, line 2, in
from .schema import *
File “/home/adminuser/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/init.py”, line 2, in
from .core import *
File “/home/adminuser/venv/lib/python3.9/site-packages/altair/vegalite/v4/schema/core.py”, line 4, in
from altair.utils.schemapi import SchemaBase, Undefined, _subclasses
File “/home/adminuser/venv/lib/python3.9/site-packages/altair/utils/init.py”, line 1, in
from .core import (
File “/home/adminuser/venv/lib/python3.9/site-packages/altair/utils/core.py”, line 13, in
import jsonschema
File “/home/adminuser/venv/lib/python3.9/site-packages/jsonschema/init.py”, line 13, in
from jsonschema._format import FormatChecker
File “/home/adminuser/venv/lib/python3.9/site-packages/jsonschema/_format.py”, line 11, in
from jsonschema.exceptions import FormatError
File “/home/adminuser/venv/lib/python3.9/site-packages/jsonschema/exceptions.py”, line 15, in
from referencing.exceptions import Unresolvable as _Unresolvable
File “/home/adminuser/venv/lib/python3.9/site-packages/referencing/init.py”, line 5, in
from referencing._core import Anchor, Registry, Resource, Specification
File “/home/adminuser/venv/lib/python3.9/site-packages/referencing/_core.py”, line 18, in
from referencing.typing import URI, Anchor as AnchorType, D, Mapping, Retrieve
File “/home/adminuser/venv/lib/python3.9/site-packages/referencing/typing.py”, line 22, in
D = TypeVar(“D”, default=Any)
TypeError: init() got an unexpected keyword argument ‘default’
[20:57:12] Streamlit server consistently failed status checks
[20:57:12] Please fix the errors, push an update to the git repo, or reboot the app.
I am unsure of what this error is exactly due to meeting it the first time, as I didn’t face this issue a few days ago. That being said, I did face another error a few days ago with the same code and requirements. I was able to successfully deploy it, but faced an issue, which I believe is related to the version of Retina Face streamlit allows.
AttributeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on
‘Manage app’ in the lower right of your app).
Traceback:
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/
exec (code, module._ dict_)
File “/mount/src/faceauthentication/streamlit_app.py”, line 99, in
stored_embedding = extract_features (stored_image, recognition_model)
File “/mount/src/faceauthentication/streamlit_app.py”, line 31, in extract_fee
face = detect_ face (image)
File “/mount/src/faceauthentication/streamlit_app.py”, line 21, in detect_face
faces = RetinaFace.detect_faces (np_image)
Does anyone know how to fix these two issues? Thank you.