opyrator icon indicating copy to clipboard operation
opyrator copied to clipboard

Opyrator launch-ui and launch-api throwing errors

Open arseniyturin opened this issue 3 years ago • 3 comments

In the fresh environment, using Python 3.9.7 on macOS Monterey 12.2.1 (x86) (tested on M1 chip, same issues) No extra packages were installed, only Opyrator and its dependencies

The code I'm trying to run:

from pydantic import BaseModel

class Input(BaseModel):
    message: str

class Output(BaseModel):
    message: str

def hello_world(input: Input) -> Output:
    """Returns the `message` of the input data."""
    return Output(message=input.message)

Issue #1

$ opyrator launch-ui my_opyrator:hello_world

ModuleNotFoundError: No module named 'streamlit.report_thread'

Issue #2

$ opyrator launch-api my_opyrator:hello_world

ImportError: cannot import name 'graphql' from 'starlette' (/Users/sean/python_envs/opyrator-env/lib/python3.9/site-packages/starlette/init.py)

Problem with streamlit (streamlit==1.6.0)

Some folks on the internet suggest downgrading streamlit, but it seems like the issue still persists. I've looked into the package itself and didn't find either report_thread.py or "report_thread" in the python files

arseniyturin avatar Mar 02 '22 14:03 arseniyturin

This seems to be a dependency issue. I got it working with pip3 install starlette==0.13.6 as a quick fix.

felixmaechtle avatar Apr 26 '22 19:04 felixmaechtle

+1. One fails on the first thing on "Getting started"... I downgraded streamlit to 1.3.1 and starlette to 0.13.6 as suggested by @felixmaechtle, now the Getting started works.

edvin-svk avatar May 03 '22 07:05 edvin-svk

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

github-actions[bot] avatar Aug 02 '22 03:08 github-actions[bot]

Can we keep this open until solved?

edvin-svk avatar Aug 17 '22 07:08 edvin-svk