-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlalchemy.exc.StatementError when setting up the database with postgres? #527
Comments
I'm having the same error as well. Did you find a solution? |
@ralbertazzi I resolved it in different way by using 2 different config file. The config file with running server with disabled indexing. Another config file with a cron job which run indexing every time we push some notebook to master. But at the end we did not implement knowledge repo. It has lot other bugs and I do not see any recent commit to knowledge repo any more. So we decided to not to use it. Probably the development has been stopped for KR. Currently we in the company will try to develop something similar but more simpler. We are also evaluating Kyso which has same feature. If kyso works well we will use kyso I guess but its a paid service. |
@DataPsycho Sorry this repo was a little inactive last year. I work at Airbnb and I'm planning to be actively maintaining it along with a few others. I've been fixing some bugs filed in the issues and merging in new features and planning to merge a UI update https://github.com/airbnb/knowledge-repo/blob/b4c534526bdda98e8ac6d32478e2a05a2aeadd88/README.md If you do end up reconsidering adopting the KR, we would welcome other bug reports and feature requests. |
@bulam Hey, |
@DataPsycho Yes, you can definitely use OneLogin for signing. In fact we use OneLogin to access the Knowledge Repo at Airbnb. To set it up, you can configure by modifying two configs here knowledge-repo/knowledge_repo/app/config_defaults.py Lines 146 to 167 in 7d910d0
An example config would be:
Eventually it would be good to provide official documentation and example code for SSO set up. |
Will try that out. But that postgres issue needed to be fixed. |
@DataPsycho your errors are little different but we were running into similar issues when trying to deploy with multiple workers. We were able to resolve our issues by calling dispose on the db engine prior to indexing. It hasn't been tested outside of our environment so YMMV but it's easy to test out: In knowledge_repo/app/app.py @self.before_first_request
def start_indexing():
current_app.db.engine.dispose() #add this line
if self.config['INDEXING_ENABLED']:
self.start_indexing() Works for us on Postgres 11, MySQL 5.7/8.0 (single and multi worker deployments) and SQLite (single worker) |
My Current Setup: postgres local server: 11.5 , python 3.6, knowledge repo 0.8.8 . My sequential workflow:
git init; git remote add origin https://github.com/DataPsycho/knowledge-posts.git
export KNOWLEDGE_REPO=kr_local
postgresql+psycopg2://knowledge_repo:knowledge_repo@localhost:5432/knowledge_repo
knowledge_repo init
(successful)knowledge_repo runserver --config config.py
That create all the tables (alembic_version, tables, posts .... votes etc). But when try to connect to the app getting the following error:
Using deploy has the same problem. I am getting the same error.
Also time to time getting the following errors and warning:
Though I tried to delete manually the index.lock file but the file does not exist.
If any one knows what is the problem?
The text was updated successfully, but these errors were encountered: