Closed andresh0816 closed 4 years ago
@el-tocino don't work
Why not?
Hi Andres,
How did you call start_backend.py
?
Did you get any specific error messages?
Yes, i call start_backend.py with python. I get this response:
name == "main" no found
try copying it to main directory and running it.
Main directory? Be more especific please
By main directory I believe he means the top-level directory of the project.
eg if you cloned the project into ~/personal-backend
you could run:
cd ~/personal-backend
cp examples/start_backend.py ./
python start_backend.py
$ python start_backend.py
Traceback (most recent call last):
File "start_backend.py", line 5, in <module>
start_backend()
File "/home/andres/anaconda3/lib/python3.7/site-packages/personal_mycroft_backend/backend/__init__.py", line 55, in start_backend
app = create_app()
File "/home/andres/anaconda3/lib/python3.7/site-packages/personal_mycroft_backend/backend/__init__.py", line 26, in create_app
from personal_mycroft_backend.backend.stt import get_stt_routes
File "/home/andres/anaconda3/lib/python3.7/site-packages/personal_mycroft_backend/backend/stt.py", line 11, in <module>
engine = STTFactory.create()
File "/home/andres/anaconda3/lib/python3.7/site-packages/personal_mycroft_backend/stt/__init__.py", line 228, in create
return clazz()
File "/home/andres/anaconda3/lib/python3.7/site-packages/personal_mycroft_backend/stt/__init__.py", line 74, in __init__
super(GoogleSTT, self).__init__()
File "/home/andres/anaconda3/lib/python3.7/site-packages/personal_mycroft_backend/stt/__init__.py", line 42, in __init__
super(TokenSTT, self).__init__()
File "/home/andres/anaconda3/lib/python3.7/site-packages/personal_mycroft_backend/stt/__init__.py", line 30, in __init__
self.credential = self.config.get("credential", {})
AttributeError: 'NoneType' object has no attribute 'get'
Have you installed the python dependencies? Personally I prefer this in a venv
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
You will also need to configure the server as outlined here: https://github.com/MycroftAI/personal-backend#install
$python start_backend.py
Traceback (most recent call last):
File "start_backend.py", line 1, in <module>
from personal_mycroft_backend.backend import start_backend
ModuleNotFoundError: No module named 'personal_mycroft_backend'
I run that with virtualenv
(env) andres@Napoleon:~/Documentos/Proyectos/web_api/examples$ python start_backend.py
Traceback (most recent call last):
File "start_backend.py", line 5, in
Are you running that from within the examples directory?
Probably need to copy start_backend.py
to /home/andres/Documentos/Proyectos/web_api/
and run it from there.
I get this:
:~/Documentos/Proyectos/web_api$ python start_backend.py
Traceback (most recent call last):
File "start_backend.py", line 5, in <module>
start_backend()
File "/home/andres/Documentos/Proyectos/web_api/personal_mycroft_backend/backend/__init__.py", line 55, in start_backend
app = create_app()
File "/home/andres/Documentos/Proyectos/web_api/personal_mycroft_backend/backend/__init__.py", line 26, in create_app
from personal_mycroft_backend.backend.stt import get_stt_routes
File "/home/andres/Documentos/Proyectos/web_api/personal_mycroft_backend/backend/stt.py", line 11, in <module>
engine = STTFactory.create()
File "/home/andres/Documentos/Proyectos/web_api/personal_mycroft_backend/stt/__init__.py", line 228, in create
return clazz()
File "/home/andres/Documentos/Proyectos/web_api/personal_mycroft_backend/stt/__init__.py", line 74, in __init__
super(GoogleSTT, self).__init__()
File "/home/andres/Documentos/Proyectos/web_api/personal_mycroft_backend/stt/__init__.py", line 42, in __init__
super(TokenSTT, self).__init__()
File "/home/andres/Documentos/Proyectos/web_api/personal_mycroft_backend/stt/__init__.py", line 30, in __init__
self.credential = self.config.get("credential", {})
AttributeError: 'NoneType' object has no attribute 'get'
Looks like #52 fixes this also
Just saw in chat that you got this working which is great.
Closing this ticket
How can i start this backed?