bbc / brave

Basic Real-time AV Editor - allowing you to preview, mix, and route live audio and video streams on the cloud
Apache License 2.0
656 stars 149 forks source link

Getting error on run pipenv run ./brave.py #79

Closed pyhubexcel closed 3 years ago

pyhubexcel commented 3 years ago

Cannot start Rest API: Sanic instance cannot be unnamed. Please use Sanic(name='your_application_name') instead. checking solution for this

I have fixed the error by adding sanic app name but after that app is running but getting insternal server error on url.

moschopsuk commented 3 years ago

Is anything else printed back on the console to indicate an error ?

aayushsaini000 commented 3 years ago

No, I have fixed this error by adding app name in init.py app = Sanic(name="brave")

aayushsaini000 commented 3 years ago

But still when i am running app and opening url i am getting 500 internal server error.

pyhubexcel commented 3 years ago

@moschopsuk

moschopsuk commented 3 years ago

Hmm I'm unable to replicate can yous share more details of your setup please ?

zhaolixiang commented 3 years ago

ERROR:sanic.root:Exception occurred while handling uri: 'http://localhost:5000/' Traceback (most recent call last): File "/Users/mark/sourcecode/brave/venv/lib/python3.7/site-packages/sanic/app.py", line 892, in handle_request request, request_name=name File "/Users/mark/sourcecode/brave/venv/lib/python3.7/site-packages/sanic/app.py", line 1220, in _run_request_middleware response = await response File "/Users/mark/sourcecode/brave/brave/api/init.py", line 42, in give_session_to_each_route_handler request['session'] = session TypeError: 'Request' object does not support item assignment

zhaolixiang commented 3 years ago

pip install sanic==19.3.1

aayushexcellence commented 3 years ago

@moschopsuk issue still not resolved....... I am still getting error on http://0.0.0.0:5000/

etech@etech-Aspire-ES1-572:~/Desktop/brave$ pipenv run ./brave.py
/home/etech/Desktop/brave/brave/inputs/input.py:37: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if position is not None and position is not -1:
/home/etech/Desktop/brave/brave/inputoutputoverlay.py:137: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if a is not 'state' and hasattr(self, a):
/home/etech/Desktop/brave/brave/connections/connection_to_mixer.py:287: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if audio_or_video is 'video':
[2021-03-15 18:00:21 +0530] [55804] [INFO] Goin' Fast @ http://0.0.0.0:5000
INFO:sanic.root:Goin' Fast @ http://0.0.0.0:5000
[2021-03-15 18:00:29 +0530] [55804] [ERROR] Exception occurred while handling uri: 'http://0.0.0.0:5000/'
Traceback (most recent call last):
  File "/home/etech/.local/share/virtualenvs/brave-Ja8gTjmL/lib/python3.8/site-packages/sanic/app.py", line 891, in handle_request
    response = await self._run_request_middleware(
  File "/home/etech/.local/share/virtualenvs/brave-Ja8gTjmL/lib/python3.8/site-packages/sanic/app.py", line 1220, in _run_request_middleware
    response = await response
  File "/home/etech/Desktop/brave/brave/api/__init__.py", line 42, in give_session_to_each_route_handler
    request['session'] = session
TypeError: 'Request' object does not support item assignment
ERROR:sanic.root:Exception occurred while handling uri: 'http://0.0.0.0:5000/'
Traceback (most recent call last):
  File "/home/etech/.local/share/virtualenvs/brave-Ja8gTjmL/lib/python3.8/site-packages/sanic/app.py", line 891, in handle_request
    response = await self._run_request_middleware(
  File "/home/etech/.local/share/virtualenvs/brave-Ja8gTjmL/lib/python3.8/site-packages/sanic/app.py", line 1220, in _run_request_middleware
    response = await response
  File "/home/etech/Desktop/brave/brave/api/__init__.py", line 42, in give_session_to_each_route_handler
    request['session'] = session
TypeError: 'Request' object does not support item assignment
aayushexcellence commented 3 years ago

![Uploading Screenshot from 2021-03-15 18-01-56.png…]()