turner-anderson / streamlit-cropper

A simple image cropper for Streamlit
MIT License
183 stars 28 forks source link

error message #1

Closed johnyquest7 closed 4 years ago

johnyquest7 commented 4 years ago

Tried running this repo on my computer. Got the following error

StreamlitAPIException: No such component directory: '/media/quest/extradrive1/AI_Projects/access_point/streamlit-cropper/streamlit_cropper/frontend/build'

Traceback

File "/media/quest/extradrive1/AI_Projects/access_point/streamlit-cropper/app.py", line 2, in from streamlit_cropper import st_cropper File "/media/quest/extradrive1/AI_Projects/access_point/streamlit-cropper/streamlit_cropper/init.py", line 16, in _component_func = components.declare_component("st_cropper", path=build_dir)

johnyquest7 commented 4 years ago

There was no build folder under frontend

turner-anderson commented 4 years ago

This should be solved with 0.1.2 which is now available on PyPi, sorry for the mix up!

johnyquest7 commented 4 years ago

It is working. Only 1 issue - it logging 'image/jpeg' in the terminal.

turner-anderson commented 4 years ago

Just spent some time trying to debug the 'image/jpeg'. I think this may be an issue that cropped into the most recent version of streamlit. I created a short program as follows:

import streamlit as st
from PIL import Image

img = Image.open("<my_path>")
st.image(img)

And I still get that message in the log. If I add the optional kwarg output_format="PNG", the log message changes to image\png. I'll raise the issue with streamlit.