Coder Social home page Coder Social logo

Comments (2)

maxima-us avatar maxima-us commented on August 30, 2024

I had a similar issue when adding new tables to the trading database. Here is what solved it :
change engine = create_engine(os.environ.get('TRADING_DB_CRED')) to :
engine = engine_from_config( config.get_section(config.config_ini_section), prefix='sqlalchemy.', poolclass=pool.NullPool) in migrations/env.py.

Hope this helps

from gryphon.

Byte1122 avatar Byte1122 commented on August 30, 2024

Hi @maxima-us thanks for helping out this issue. I have tried and now I get another error;

--||--
/grybot$ gryphon-exec run-migrations --database trading --execute
INFO:gryphon.execution.controllers.run_migrations:Migrating the trading database
Traceback (most recent call last):
File "/usr/local/bin/gryphon-exec", line 10, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/gryphon/execution/app.py", line 544, in main
app.run()
File "/usr/local/lib/python2.7/site-packages/cement/core/foundation.py", line 882, in run
return_val = self.controller._dispatch()
File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 471, in _dispatch
return func()
File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 477, in _dispatch
return func()
File "/usr/local/lib/python2.7/site-packages/gryphon/execution/app.py", line 491, in default
run_migrations.main(target_db, execute)
File "/usr/local/lib/python2.7/site-packages/gryphon/execution/controllers/run_migrations.py", line 63, in main
run_migrations(target_db)
File "/usr/local/lib/python2.7/site-packages/gryphon/execution/controllers/run_migrations.py", line 50, in run_migrations
command.upgrade(alembic_cfg, 'head')
File "/usr/local/lib/python2.7/site-packages/alembic/command.py", line 124, in upgrade
script.run_env()
File "/usr/local/lib/python2.7/site-packages/alembic/script.py", line 193, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/local/lib/python2.7/site-packages/alembic/util.py", line 177, in load_python_file
module = load_module(module_id, path)
File "/usr/local/lib/python2.7/site-packages/alembic/compat.py", line 39, in load_module
return imp.load_source(module_id, path, fp)
File "/usr/local/lib/python2.7/site-packages/gryphon/execution/migrations/env.py", line 98, in
run_migrations_online()
File "/usr/local/lib/python2.7/site-packages/gryphon/execution/migrations/env.py", line 81, in run_migrations_online
poolclass=pool.NullPool)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/init.py", line 485, in engine_from_config
url = options.pop("url")
KeyError: 'url'
--||--

Thanks!

from gryphon.

Related Issues (20)

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.