Flask Error i read through the other Flask Questions and still having trouble #460
Unanswered
Youngstud4321
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I assume its wanting the WSGI server but i cant do that on my computer. is there another way around that?
heres my terminal error
i also have pandas installed so i dont know why its saying that as well
PS D:\nba sports py\NBA-Machine-Learning-Sports-Betting> cd Flask
PS D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask> flask --debug run
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Press CTRL+C to quit
Traceback (most recent call last):
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\main.py", line 4, in
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
127.0.0.1 - - [19/Dec/2024 09:15:18] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1478, in call
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1458, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 67, in index
fanduel = fetch_fanduel(ttl_hash=get_ttl_hash())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 13, in fetch_fanduel
return fetch_game_data(sportsbook="fanduel")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 27, in fetch_game_data
stdout = subprocess.check_output(cmd, cwd="../").decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'main.py', '-xgb', '-odds=fanduel']' returned non-zero exit status 1.
127.0.0.1 - - [19/Dec/2024 09:15:18] "GET /?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 304 -
127.0.0.1 - - [19/Dec/2024 09:15:18] "GET /?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 -
127.0.0.1 - - [19/Dec/2024 09:15:18] "GET /?debugger=yes&cmd=resource&f=console.png&s=8ttLaEzCvZyaGGmAxy4D HTTP/1.1" 200 -
Traceback (most recent call last):
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\main.py", line 4, in
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
127.0.0.1 - - [19/Dec/2024 09:15:24] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1478, in call
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1458, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 67, in index
fanduel = fetch_fanduel(ttl_hash=get_ttl_hash())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 13, in fetch_fanduel
return fetch_game_data(sportsbook="fanduel")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 27, in fetch_game_data
stdout = subprocess.check_output(cmd, cwd="../").decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'main.py', '-xgb', '-odds=fanduel']' returned non-zero exit status 1.
127.0.0.1 - - [19/Dec/2024 09:15:24] "GET /?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 304 -
127.0.0.1 - - [19/Dec/2024 09:15:24] "GET /?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 -
127.0.0.1 - - [19/Dec/2024 09:15:24] "GET /?debugger=yes&cmd=resource&f=console.png&s=8ttLaEzCvZyaGGmAxy4D HTTP/1.1" 304 -
Traceback (most recent call last):
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\main.py", line 4, in
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
127.0.0.1 - - [19/Dec/2024 09:15:26] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1478, in call
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1458, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "d:\nba sports py\NBA-Machine-Learning-Sports-Betting.venv\Lib\site-packages\flask\app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 67, in index
fanduel = fetch_fanduel(ttl_hash=get_ttl_hash())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 13, in fetch_fanduel
return fetch_game_data(sportsbook="fanduel")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\nba sports py\NBA-Machine-Learning-Sports-Betting\Flask\app.py", line 27, in fetch_game_data
stdout = subprocess.check_output(cmd, cwd="../").decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'main.py', '-xgb', '-odds=fanduel']' returned non-zero exit status 1.
127.0.0.1 - - [19/Dec/2024 09:15:26] "GET /?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 304 -
127.0.0.1 - - [19/Dec/2024 09:15:26] "GET /?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 -
127.0.0.1 - - [19/Dec/2024 09:15:26] "GET /?debugger=yes&cmd=resource&f=console.png&s=8ttLaEzCvZyaGGmAxy4D HTTP/1.1" 304 -
Beta Was this translation helpful? Give feedback.
All reactions