ImportError during db migration: cannot import name rdbms_googleapi

Asked 2 years ago, Updated 2 years ago, 123 views

I use Google App Engine.

I'm going to build a db and make it all

I did dbinit to model.py.

If you try to create a migration at the terminal, an error appears as follows.

 python manager.py db migrate
/Library/Python/2.7/site-packages/flask_sqlalchemy/__init__.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
  'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
Traceback (most recent call last):
  File "manager.py", line 3, in <module>
    manager.run()
  File "/Library/Python/2.7/site-packages/flask_script/__init__.py", line 412, in run
    result = self.handle(sys.argv[0], sys.argv[1:])
  File "/Library/Python/2.7/site-packages/flask_script/__init__.py", line 383, in handle
    res = handle(*args, **config)
  File "/Library/Python/2.7/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/flask_migrate/__init__.py", line 182, in migrate
    version_path=version_path, rev_id=rev_id)
  File "/Library/Python/2.7/site-packages/alembic/command.py", line 176, in revision
    script_directory.run_env()
  File "/Library/Python/2.7/site-packages/alembic/script/base.py", line 421, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/Library/Python/2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
    module = load_module_py(module_id, path)
  File "/Library/Python/2.7/site-packages/alembic/util/compat.py", line 75, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "migrations/env.py", line 87, in <module>
    run_migrations_online()
  File "migrations/env.py", line 70, in run_migrations_online
    poolclass=pool.NullPool)
  File "/Library/Python/2.7/site-packages/sqlalchemy/engine/__init__.py", line 428, in engine_from_config
    return create_engine(url, **options)
  File "/Library/Python/2.7/site-packages/sqlalchemy/engine/__init__.py", line 387, in create_engine
    return strategy.create(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/sqlalchemy/engine/strategies.py", line 80, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/Library/Python/2.7/site-packages/sqlalchemy/dialects/mysql/gaerdbms.py", line 77, in dbapi
    from google.storage.speckle.python.api import rdbms_googleapi
ImportError: cannot import name rdbms_googleapi

What should I do? Ccc

python google-cloud-platform flask

2022-09-22 13:23

1 Answers

I searched and they said adding SQLALCHEMY_TRACK_MODIFICATIONS = False to the app config will solve it.


2022-09-22 13:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.