Giter Club home page Giter Club logo

reddit-hyped-stocks's Introduction

Welcome! My name is Lukas Steinbrecher.


I am a passionate Software Engineer ๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป based in Vienna ๐Ÿ‡ฆ๐Ÿ‡น consulting financial institutions ๐Ÿข at Senacor.

If you just want to say hello ๐Ÿ‘‹ or ask a question, send me a short message ๐Ÿ’Œ. I am always happy to make new connections ๐Ÿป.

Lukas's Linkedin Lukas's Xing


Read my blog at lukstei.com.







visitors

reddit-hyped-stocks's People

Contributors

aelx311 avatar dependabot-preview[bot] avatar erjanmx avatar lukstei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reddit-hyped-stocks's Issues

Error: Not allowed to request resource

Hello,
Interesting project! I had always thought it would be a cool idea to see how Reddit correlated with the stock market so thank you for putting something like this together!

I followed the steps listed for getting this running using Docker. I am running it on Ubuntu 20.04.2 LTS with Nginx proxy.

Unfortunately when I go to the website, I get the error "Error: Not allowed to request resource". From the command line, everything looks normal:

vps01โžœ  hype : main โœ˜ :โœ–โœน แ…  ./run-server-docker.sh
Sending build context to Docker daemon  27.62MB
Step 1/14 : FROM node:15-buster-slim AS frontend
 ---> 0107c4fc6de9
Step 2/14 : COPY frontend /app/frontend
 ---> Using cache
 ---> 12895bebde1b
Step 3/14 : WORKDIR /app/frontend
 ---> Using cache
 ---> 76ab9601e7d6
Step 4/14 : RUN npm ci
 ---> Using cache
 ---> c4218027bb8b
Step 5/14 : RUN npm run build
 ---> Using cache
 ---> 4e5bd0037789
Step 6/14 : FROM python:3.9-slim-buster
 ---> b2b5367cdfd4
Step 7/14 : RUN mkdir -p /app/backend
 ---> Using cache
 ---> 7e10de788592
Step 8/14 : WORKDIR /app/backend
 ---> Using cache
 ---> 916dcab29446
Step 9/14 : COPY backend/requirements.txt /app/backend/
 ---> Using cache
 ---> a90bb54f59d5
Step 10/14 : RUN pip install -r requirements.txt
 ---> Using cache
 ---> 5ea7224e2e96
Step 11/14 : COPY backend /app/backend
 ---> Using cache
 ---> f3ebf8a025d3
Step 12/14 : COPY --from=frontend /app/frontend/build /app/frontend/build
 ---> Using cache
 ---> 28e755264b3e
Step 13/14 : ENTRYPOINT ["python"]
 ---> Using cache
 ---> 034669003f12
Step 14/14 : CMD ["server.py"]
 ---> Using cache
 ---> 3731d9d297ec
Successfully built 3731d9d297ec
Successfully tagged pennystocks:latest
 * Serving Flask app "server" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
172.17.0.1 - - [17/Mar/2021 13:15:09] "GET / HTTP/1.0" 200 -
172.17.0.1 - - [17/Mar/2021 13:15:10] "GET / HTTP/1.0" 200 -
^C%

My Nginx access.log file doesn't show anything strange for those same two requests:

10.0.0.202 - - [17/Mar/2021:09:15:09 -0400] "GET / HTTP/1.1" 200 1175 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15"
10.0.0.202 - - [17/Mar/2021:09:15:10 -0400] "GET / HTTP/1.1" 200 1175 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15"

Nginx doesn't have anything in the error.log file.

Screen Shot 2021-03-17 at 9 10 32 AM

I would be happy to provide some more log files if you let me know where to look.

Edit:
I should add that I did copy the data.db.example over to data.db and then I ran the run-load-data-docker.sh script which seemed to complete successfully.

JSON.parse error

Hi there, thanks for making this, looks really cool!

Unfortunately, I have an error. The error says:
Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data

I built my clone on Windows 10 using python and node.js, and set up the API with reddit as your instructions described.

while installing the pre-requisites i also recieved an error after doing npm i which told me on of the installed things had a vulnerability and should be rolled back or updated, so i just updated... not sure if that specific version was critical?

new

My name is Luis, I'm a big-data machine-learning developer, I'm a fan of your work, and I usually check your updates.

I was afraid that my savings would be eaten by inflation. I have created a powerful tool that based on past technical patterns (volatility, moving averages, statistics, trends, candlesticks, support and resistance, stock index indicators).
All the ones you know (RSI, MACD, STOCH, Bolinger Bands, SMA, DEMARK, Japanese candlesticks, ichimoku, fibonacci, williansR, balance of power, murrey math, etc) and more than 200 others.

The tool creates prediction models of correct trading points (buy signal and sell signal, every stock is good traded in time and direction).
For this I have used big data tools like pandas python, stock market libraries like: tablib, TAcharts ,pandas_ta... For data collection and calculation.
And powerful machine-learning libraries such as: Sklearn.RandomForest , Sklearn.GradientBoosting, XGBoost, Google TensorFlow and Google TensorFlow LSTM.

With the models trained with the selection of the best technical indicators, the tool is able to predict trading points (where to buy, where to sell) and send real-time alerts to Telegram or Mail. The points are calculated based on the learning of the correct trading points of the last 2 years (including the change to bear market after the rate hike).

I think it could be useful to you, to improve, I would like to share it with you, and if you are interested in improving and collaborating I am also willing, and if not file it in the box.

If tou want, Please read the readme , and in case of any problem you can contact me ,
If you are convinced try to install it with the documentation.
https://github.com/Leci37/LecTrade/tree/develop I appreciate the feedback

Tried to install via instructions and got a 500 served from /scores

Tried to install via instructions and got a 500 served from /scores. Full output below.

`Kevins-iMac:projects k3vl4r$ git clone https://github.com/lukstei/reddit-hypetocks.git
Cloning into 'reddit-hyped-stocks'...
remote: Enumerating objects: 106, done.
remote: Counting objects: 100% (106/106), done.
remote: Compressing objects: 100% (83/83), done.
remote: Total 106 (delta 36), reused 64 (delta 13), pack-reused 0
Receiving objects: 100% (106/106), 18.97 MiB | 8.81 MiB/s, done.
Resolving deltas: 100% (36/36), done.
Kevins-iMac:projects k3vl4r$ cd red
red_team_tool_countermeasures/ reddit-hyped-stocks/
Kevins-iMac:projects k3vl4r$ cd reddit-hyped-stocks/
Kevins-iMac:reddit-hyped-stocks k3vl4r$ cd backend/
Kevins-iMac:backend k3vl4r$ cp ~/Downloads/data.db .
Kevins-iMac:backend k3vl4r$ cd ../
Kevins-iMac:reddit-hyped-stocks k3vl4r$ ./run-server-docker.sh
Sending build context to Docker daemon 24.42MB
Step 1/14 : FROM node:15-buster-slim AS frontend
15-buster-slim: Pulling from library/node
6f28985ad184: Pull complete
45d607bea48c: Pull complete
e9b846bc0039: Pull complete
eb8cfa0849c1: Pull complete
ca359aa3f87c: Pull complete
Digest: sha256:9eec4779831fa9b577b30aa55ae231d09ea3fecc01ac5f97510f7c785ea0e58f
Status: Downloaded newer image for node:15-buster-slim
---> 0107c4fc6de9
Step 2/14 : COPY frontend /app/frontend
---> 5230b7f11b2a
Step 3/14 : WORKDIR /app/frontend
---> Running in fd4fa074131b
Removing intermediate container fd4fa074131b
---> 1c2fdbca56d9
Step 4/14 : RUN npm ci
---> Running in 77b9d02e0af7

added 2019 packages, and audited 2020 packages in 1m

2 high severity vulnerabilities

To address all issues, run:
npm audit fix

Run npm audit for details.
npm notice
npm notice New patch version of npm available! 7.6.0 -> 7.6.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.3
npm notice Run npm install -g [email protected] to update!
npm notice
Removing intermediate container 77b9d02e0af7
---> b99fd86cbb6b
Step 5/14 : RUN npm run build
---> Running in 146274318cb5

[email protected] build
react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

221.55 KB build/static/js/2.0f683df5.chunk.js
4.59 KB build/static/js/main.5c3256a9.chunk.js
769 B build/static/js/runtime-main.c60b7f5c.js
260 B build/static/css/main.4ec6e21f.chunk.css

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

npm install -g serve
serve -s build

Find out more about deployment here:

https://cra.link/deployment

npm notice
npm notice New patch version of npm available! 7.6.0 -> 7.6.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.3
npm notice Run npm install -g [email protected] to update!
npm notice
Removing intermediate container 146274318cb5
---> b8fde2ea5547
Step 6/14 : FROM python:3.9-slim-buster
3.9-slim-buster: Pulling from library/python
6f28985ad184: Already exists
2cab076f918f: Pull complete
a1a3f2ca0e75: Pull complete
2a1aa0b42858: Pull complete
a2ca14e613f1: Pull complete
Digest: sha256:aab965875430293ae0f7fe8a369947e598eb568dca0cac2f934d87737101df5b
Status: Downloaded newer image for python:3.9-slim-buster
---> b2b5367cdfd4
Step 7/14 : RUN mkdir -p /app/backend
---> Running in 049d838f9aeb
Removing intermediate container 049d838f9aeb
---> 65145e77cf4a
Step 8/14 : WORKDIR /app/backend
---> Running in 750ea0d0b369
Removing intermediate container 750ea0d0b369
---> 327500644148
Step 9/14 : COPY backend/requirements.txt /app/backend/
---> 3d7468913bd2
Step 10/14 : RUN pip install -r requirements.txt
---> Running in c01bc9fd8967
Collecting Flask==1.1.2
Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting Flask-Cors==3.0.10
Downloading Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
Collecting Flask-SQLAlchemy==2.4.4
Downloading Flask_SQLAlchemy-2.4.4-py2.py3-none-any.whl (17 kB)
Collecting praw==7.1.4
Downloading praw-7.1.4-py3-none-any.whl (155 kB)
Collecting SQLAlchemy==1.4.0b2
Downloading SQLAlchemy-1.4.0b2-cp39-cp39-manylinux2010_x86_64.whl (1.5 MB)
Collecting watchdog==1.0.2
Downloading watchdog-1.0.2-py3-none-manylinux2014_x86_64.whl (72 kB)
Collecting yfinance==0.1.55
Downloading yfinance-0.1.55.tar.gz (23 kB)
Collecting simplejson==3.17.2
Downloading simplejson-3.17.2.tar.gz (83 kB)
Collecting numpy==1.20.1
Downloading numpy-1.20.1-cp39-cp39-manylinux2010_x86_64.whl (15.4 MB)
Collecting pandas==1.2.2
Downloading pandas-1.2.2-cp39-cp39-manylinux1_x86_64.whl (9.7 MB)
Collecting cachetools==4.2.1
Downloading cachetools-4.2.1-py3-none-any.whl (12 kB)
Collecting tqdm==4.56.2
Downloading tqdm-4.56.2-py2.py3-none-any.whl (72 kB)
Collecting Jinja2>=2.10.1
Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting itsdangerous>=0.24
Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Werkzeug>=0.15
Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting click>=5.1
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Six
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pytz>=2017.3
Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting python-dateutil>=2.7.3
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting websocket-client>=0.54.0
Downloading websocket_client-0.58.0-py2.py3-none-any.whl (61 kB)
Collecting update-checker>=0.18
Downloading update_checker-0.18.0-py3-none-any.whl (7.0 kB)
Collecting prawcore<2.0,>=1.5.0
Downloading prawcore-1.5.0-py3-none-any.whl (15 kB)
Collecting greenlet!=0.4.17
Downloading greenlet-1.0.0-cp39-cp39-manylinux2010_x86_64.whl (163 kB)
Collecting requests>=2.20
Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting multitasking>=0.0.7
Downloading multitasking-0.0.9.tar.gz (8.1 kB)
Collecting lxml>=4.5.1
Downloading lxml-4.6.2-cp39-cp39-manylinux1_x86_64.whl (5.4 MB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl (32 kB)
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
Collecting chardet<5,>=3.0.2
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting certifi>=2017.4.17
Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Building wheels for collected packages: simplejson, yfinance, multitasking
Building wheel for simplejson (setup.py): started
Building wheel for simplejson (setup.py): finished with status 'done'
Created wheel for simplejson: filename=simplejson-3.17.2-py3-none-any.whl size=55458 sha256=5bbfb678eea68ee1a0fe93a2443fcf9073eb3c49a4fa1756b5bf77c6cbf2993a
Stored in directory: /root/.cache/pip/wheels/a2/c7/6a/2dabbded050716dd50faef2145e3ffa509b0d3895899c599f5
Building wheel for yfinance (setup.py): started
Building wheel for yfinance (setup.py): finished with status 'done'
Created wheel for yfinance: filename=yfinance-0.1.55-py2.py3-none-any.whl size=22616 sha256=99578a4a480f72b6afb1114d3979d9f8339bd88f50192961cda6ef7dcd8832a3
Stored in directory: /root/.cache/pip/wheels/75/6f/b1/2a6be95ab6a39ae5e82cef79a5bed8b5b841ee1322fecf3dee
Building wheel for multitasking (setup.py): started
Building wheel for multitasking (setup.py): finished with status 'done'
Created wheel for multitasking: filename=multitasking-0.0.9-py3-none-any.whl size=8368 sha256=72d4dfd407db0148032527615596eafb7328c85e449ab7cac56466e36904aefe
Stored in directory: /root/.cache/pip/wheels/1d/13/0b/0c32509050dcd9264e9a90b1d9d2dc9c6db9538db151ea7d26
Successfully built simplejson yfinance multitasking
Installing collected packages: urllib3, Six, MarkupSafe, idna, chardet, certifi, Werkzeug, requests, pytz, python-dateutil, numpy, Jinja2, itsdangerous, greenlet, click, websocket-client, update-checker, SQLAlchemy, prawcore, pandas, multitasking, lxml, Flask, yfinance, watchdog, tqdm, simplejson, praw, Flask-SQLAlchemy, Flask-Cors, cachetools
Successfully installed Flask-1.1.2 Flask-Cors-3.0.10 Flask-SQLAlchemy-2.4.4 Jinja2-2.11.3 MarkupSafe-1.1.1 SQLAlchemy-1.4.0b2 Six-1.15.0 Werkzeug-1.0.1 cachetools-4.2.1 certifi-2020.12.5 chardet-4.0.0 click-7.1.2 greenlet-1.0.0 idna-2.10 itsdangerous-1.1.0 lxml-4.6.2 multitasking-0.0.9 numpy-1.20.1 pandas-1.2.2 praw-7.1.4 prawcore-1.5.0 python-dateutil-2.8.1 pytz-2021.1 requests-2.25.1 simplejson-3.17.2 tqdm-4.56.2 update-checker-0.18.0 urllib3-1.26.4 watchdog-1.0.2 websocket-client-0.58.0 yfinance-0.1.55
Removing intermediate container c01bc9fd8967
---> 2dab1d58e859
Step 11/14 : COPY backend /app/backend
---> f4c916e2410f
Step 12/14 : COPY --from=frontend /app/frontend/build /app/frontend/build
---> 723f109e72be
Step 13/14 : ENTRYPOINT ["python"]
---> Running in 2af463fd7d01
Removing intermediate container 2af463fd7d01
---> 5eb3be2382f0
Step 14/14 : CMD ["server.py"]
---> Running in 48fb4f252c95
Removing intermediate container 48fb4f252c95
---> 1ab5e2f26e10
Successfully built 1ab5e2f26e10
Successfully tagged pennystocks:latest

  • Serving Flask app "server" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
  • Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
    172.17.0.1 - - [17/Mar/2021 21:17:49] "GET / HTTP/1.1" 200 -
    172.17.0.1 - - [17/Mar/2021 21:17:50] "GET /static/js/main.5c3256a9.chunk.js HTTP/1.1" 200 -
    172.17.0.1 - - [17/Mar/2021 21:17:50] "GET /static/js/2.0f683df5.chunk.js HTTP/1.1" 200 -
    172.17.0.1 - - [17/Mar/2021 21:17:50] "GET /static/css/main.4ec6e21f.chunk.css HTTP/1.1" 200 -
    172.17.0.1 - - [17/Mar/2021 21:17:50] "GET /settings/tickerClassifications HTTP/1.1" 200 -
    [2021-03-17 21:17:50,835] ERROR in app: Exception on /scores [GET]
    Traceback (most recent call last):
    File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1681, in _execute_context
    self.dialect.do_execute(
    File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
    cursor.execute(statement, parameters)
    sqlite3.OperationalError: no such table: reddit_posts

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/app/backend/server.py", line 104, in calculate
return calculate_cached()
File "/app/backend/server.py", line 55, in calculate_cached
score = TickerScoreCalculation(ignore_tickers=get_settings_value("blacklist", []))
File "/app/backend/ticker_score_calculation.py", line 47, in init
for posts_row in query:
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2749, in iter
return self._iter().iter()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2756, in _iter
result = self.session.execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1653, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1496, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1365, in _execute_clauseelement
ret = self._execute_context(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1724, in _execute_context
self.handle_dbapi_exception(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1905, in handle_dbapi_exception
util.raise
(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 198, in raise

raise exception
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1681, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: reddit_posts
[SQL: SELECT reddit_posts.id AS reddit_posts_id, reddit_posts.subreddits AS reddit_posts_subreddits, reddit_posts.date AS reddit_posts_date, reddit_posts.posts AS reddit_posts_posts
FROM reddit_posts
WHERE reddit_posts.date >= ? ORDER BY reddit_posts.date ASC]
[parameters: ('2021-03-10',)]
(Background on this error at: http://sqlalche.me/e/14/e3q8)
172.17.0.1 - - [17/Mar/2021 21:17:50] "GET /scores HTTP/1.1" 500 -
172.17.0.1 - - [17/Mar/2021 21:17:50] "GET /favicon.ico HTTP/1.1" 200 -
172.17.0.1 - - [17/Mar/2021 21:17:55] "GET / HTTP/1.1" 304 -
172.17.0.1 - - [17/Mar/2021 21:17:55] "GET /static/js/2.0f683df5.chunk.js HTTP/1.1" 304 -
172.17.0.1 - - [17/Mar/2021 21:17:55] "GET /static/js/main.5c3256a9.chunk.js HTTP/1.1" 304 -
[2021-03-17 21:17:55,934] ERROR in app: Exception on /scores [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1681, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: reddit_posts

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/app/backend/server.py", line 104, in calculate
return calculate_cached()
File "/app/backend/server.py", line 55, in calculate_cached
score = TickerScoreCalculation(ignore_tickers=get_settings_value("blacklist", []))
File "/app/backend/ticker_score_calculation.py", line 47, in init
for posts_row in query:
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2749, in iter
return self._iter().iter()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2756, in _iter
result = self.session.execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1653, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1496, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1365, in _execute_clauseelement
ret = self._execute_context(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1724, in _execute_context
self.handle_dbapi_exception(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1905, in handle_dbapi_exception
util.raise
(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 198, in raise

raise exception
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1681, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: reddit_posts
[SQL: SELECT reddit_posts.id AS reddit_posts_id, reddit_posts.subreddits AS reddit_posts_subreddits, reddit_posts.date AS reddit_posts_date, reddit_posts.posts AS reddit_posts_posts
FROM reddit_posts
WHERE reddit_posts.date >= ? ORDER BY reddit_posts.date ASC]
[parameters: ('2021-03-10',)]
(Background on this error at: http://sqlalche.me/e/14/e3q8)
172.17.0.1 - - [17/Mar/2021 21:17:55] "GET /scores HTTP/1.1" 500 -
172.17.0.1 - - [17/Mar/2021 21:17:55] "GET /settings/tickerClassifications HTTP/1.1" 200 -
172.17.0.1 - - [17/Mar/2021 21:18:15] "GET / HTTP/1.1" 200 -
172.17.0.1 - - [17/Mar/2021 21:18:15] "GET /static/js/main.5c3256a9.chunk.js HTTP/1.1" 200 -
172.17.0.1 - - [17/Mar/2021 21:18:15] "GET /static/css/main.4ec6e21f.chunk.css HTTP/1.1" 200 -
172.17.0.1 - - [17/Mar/2021 21:18:15] "GET /static/js/2.0f683df5.chunk.js HTTP/1.1" 200 -
172.17.0.1 - - [17/Mar/2021 21:18:15] "GET /settings/tickerClassifications HTTP/1.1" 200 -
[2021-03-17 21:18:15,711] ERROR in app: Exception on /scores [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1681, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: reddit_posts

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/app/backend/server.py", line 104, in calculate
return calculate_cached()
File "/app/backend/server.py", line 55, in calculate_cached
score = TickerScoreCalculation(ignore_tickers=get_settings_value("blacklist", []))
File "/app/backend/ticker_score_calculation.py", line 47, in init
for posts_row in query:
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2749, in iter
return self._iter().iter()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2756, in _iter
result = self.session.execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1653, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1496, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1365, in _execute_clauseelement
ret = self._execute_context(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1724, in _execute_context
self.handle_dbapi_exception(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1905, in handle_dbapi_exception
util.raise
(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 198, in raise

raise exception
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1681, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: reddit_posts
[SQL: SELECT reddit_posts.id AS reddit_posts_id, reddit_posts.subreddits AS reddit_posts_subreddits, reddit_posts.date AS reddit_posts_date, reddit_posts.posts AS reddit_posts_posts
FROM reddit_posts
WHERE reddit_posts.date >= ? ORDER BY reddit_posts.date ASC]
[parameters: ('2021-03-10',)]
(Background on this error at: http://sqlalche.me/e/14/e3q8)
172.17.0.1 - - [17/Mar/2021 21:18:15] "GET /scores HTTP/1.1" 500 -
172.17.0.1 - - [17/Mar/2021 21:18:15] "GET /favicon.ico HTTP/1.1" 200 -
172.17.0.1 - - [17/Mar/2021 21:18:20] "GET /static/js/main.5c3256a9.chunk.js.map HTTP/1.1" 200 -
`

Error: Failed to fetch/Error: NetworkError when attempting to fetch resource.

After downloading the repository here on github.com, installing Python 3 from the website (not the Microsoft app store) and Node.js, installing the backend dependencies, using git bash to run start.sh, installing the frontend dependencies, and running frontend dev server (after successfully loading the data from the Reddit API), I get the following error in Edge: "Error: Failed to fetch" after opening http://localhost:3000/. I even tried Firefox and still get a similar error: "Error: NetworkError when attempting to fetch resource."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.