robmarkcole / deepstack-ui

UI for working with Deepstack
https://github.com/johnolafenwa/DeepStack
GNU General Public License v3.0
136 stars 43 forks source link

deepstack-ui giving an error "Bad url supplied, url" from fresh install #62

Closed grimsan55 closed 3 years ago

grimsan55 commented 3 years ago

I'm running deepstack & deepstack-ui in seperate docker containers on my Synology NAS. Deepstack-ui is not loading properly even though it looks like all params are correct.

Here is my docker compose file:

version: "3.9"
services:
  deepstack:
    container_name: deepstack
    restart: unless-stopped
    image: deepquestai/deepstack
    ports:
      - '5025:5000'
    environment:
      - VISION-DETECTION=True   
    volumes:
      - /volume1/docker/deepstack:/modelstore/detection
      - /volume1/docker/deepstack/datastore:/datastore
  deepstack_ui:
    container_name: deepstack_ui
    restart: unless-stopped
    image: robmarkcole/deepstack-ui
    environment: 
      - DEEPSTACK_IP=192.168.1.100
      - DEEPSTACK_PORT=5025
      - DEEPSTACK_TIMEOUT=20
      - DEEPSTACK_CUSTOM_MODEL=fire
      - DEEPSTACK_UI_DEBUG_MODE=True
    ports:
      - '8501:8501'

Whenever i start deepstack-ui I get the following error message: DeepstackException: Bad url supplied, url http://192.168.1.100:5025/v1/vision/custom/fire raised error 404 Traceback: File "/usr/local/lib/python3.8/dist-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.__dict__) File "/app/deepstack-ui.py", line 205, in <module> predictions = process_image_object(pil_image, dsobject) File "/usr/local/lib/python3.8/dist-packages/streamlit/caching.py", line 604, in wrapped_func return get_or_create_cached_value() File "/usr/local/lib/python3.8/dist-packages/streamlit/caching.py", line 588, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/app/deepstack-ui.py", line 50, in process_image_object predictions = dsobject.detect(image_bytes) File "/usr/local/lib/python3.8/dist-packages/deepstack/core.py", line 197, in detect response = process_image( File "/usr/local/lib/python3.8/dist-packages/deepstack/core.py", line 128, in process_image raise DeepstackException(f"Bad url supplied, url {url} raised error {BAD_URL}")

I've looked and looked over and over and the url seems to be correct to me, even in the error log its showing a valid url.

I made a little C# application and it can post properly on var output = await client.PostAsync("http://192.168.1.100:5025/v1/vision/detection", request);

grimsan55 commented 3 years ago
  - DEEPSTACK_CUSTOM_MODEL=fire was the bad guy in the scenario. Sorry about that