Closed 5John7 closed 4 months ago
It's a flask issue. Please seek help from other forums. e.g. https://stackoverflow.com/questions/41448088/flask-app-getting-error-of-could-not-locate-flask-application-flask-app-e (not sure if it works)
Thanks for getting back to me on that. Could you help me out with which python file to run when I run flask? Or is there an entirely new file that gets created when I run the export command. I have been looking all over the forums about how to execute flask and how it works, but it needs a python file to execute.
I understand that I need to run the command export FLASK_APP=portal but I don’t immediately see any changes to the files inside the folders.
the entry point should be the portal
module, or this file https://github.com/fga401/AutoTableTurf/blob/master/portal/__init__.py if that's what you want
Thanks, I’ll have to see if I can get it running with that.
If i run it as
sudo python3 -m flask run --host=0.0.0.0
it wouldnt work, even after setting the environmnet variable, however if i ran it as:
sudo FLASK_APP=portal python3 -m flask run --host=0.0.0.0
it ran fine
That worked perfectly, thanks. Please note it didn’t work immediately because the error it gave me told me that I had to install a library, specifically the libcblas.so.3 using this command: sudo apt-get install libatlas-base-dev. After I did that, your command worked great!
I would say this issue is solved, but I guess it’s not that easy for the program to work, because I can’t get the webpage to connect to my Nintendo switch or to my capture device. (The capture device is connected properly to my computer and the computer sees it, but the browser has no option) Maybe I’m just blind and I’m not putting in the correct address or something. P.S. My Nintendo switch is saved as a Bluetooth device on my raspberry pi.
I’m guessing that I have to run the nxbt flask app from the first step, then run the main flask program at the same time then connect to the port of the nxbt app.
If that’s the case, I will need to change the port of one of the programs to get it to work.
I successfully got it running by running on a different port by using this command: sudo FLASK_APP=portal python3 -m flask run --host=0.0.0.0 --port 5001
I'm lost with what I'm supposed to do next when I came to this error: "Could not locate a flask application" I'm thinking maybe I need to run the commands in a certain directory? Another possibility is that the export command isn't pointing to the correct file? I'm still somewhat new to linux.
I did get the test for the nxbt_server to work perfectly, the web portal says "ok" in my web browser and connected to my nintendo switch without any problems.
I have attached a screenshot of what's going on. Currently running on raspberry pi4B
Thank you.