Error while upgrading ODOO from V11 to V12 - python

While migrating my ODOO from version 11 to 12 using openUpgrade, I've encountered the following issue. I am using the community version of ODOO.
Traceback (most recent call last):
File "/home/user/company/version12/OpenUpgrade/odoo/service/server.py", line 1162, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/user/company/version12/OpenUpgrade/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/user/company/version12/OpenUpgrade/odoo/modules/loading.py", line 478, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/user/company/version12/OpenUpgrade/odoo/modules/loading.py", line 361, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/user/company/version12/OpenUpgrade/odoo/modules/loading.py", line 196, in load_module_graph
load_openerp_module(package.name)
File "/home/user/company/version12/OpenUpgrade/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "/home/user/company/version12/OpenUpgrade/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 3, in <module>
File "/home/user/company/erp12/company-erp-v3/mail_trail_message/models/__init__.py", line 5, in <module>
from . import mail_thread
File "/home/user/company/erp12/company-erp-v3/mail_trail_message/models/mail_thread.py", line 33, in <module>
class MailThread(models.AbstractModel):
File "/home/user/company/version12/OpenUpgrade/odoo/api.py", line 112, in _new_
value = guess(value)
File "/home/user/company/version12/OpenUpgrade/odoo/api.py", line 690, in guess
args, vname, kwname, defaults = getargspec(method)
File "/usr/lib/python3.8/inspect.py", line 1095, in getargspec
raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them

File "/home/user/company/erp12/company-erp-v3/mail_trail_message/models/mail_thread.py", line 33, in <module>
This is where you should look at. I believe Odoo has no module name mail_trail_message

Related

Python 3.11 installing repl-cli: setuptools not found even it's installed

That's it. I am installing repl-cli but it's giving "ModuleNotFoundError: No module named 'setuptools'".
I tried:
pip install setuptools
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: setuptools in /home/bitte/.local/lib/python3.11/site-packages (67.1.0)
And then:
pip install repl-cli
.
. Tons of installation verbose
.
RROR: Exception:
Traceback (most recent call last):
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 415, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 373, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 213, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 204, in _get_updated_criteria
self._add_to_criteria(criteria, requirement, parent=candidate)
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
return bool(self._sequence)
^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
return any(self)
^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
super().__init__(
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
self.dist = self._prepare()
^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
dist = self._prepare_distribution()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 491, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 577, in _prepare_linked_requirement
dist = _get_prepared_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 48, in prepare_distribution_metadata
self._install_build_reqs(finder)
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 118, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 95, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 701, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 166, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 321, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
File "/home/bitte/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'
Just don't know what to do. I am this whole day trying to install packages and searching errors on google. I already solved at leats 7 error messages for installing this today and I can't fix this one alone.

arguments already parsed: cannot register CLI option problem

I am trying to run a project About sdn mininet&ryu controller. source: https://github.com/archanas23/SDN-Project but when I try to run a dumper file step 3, I get this error.
Command:
PYTHONPATH=. ./bin/ryu-manager --verbose --observe-links ryu/topology/dumper.py ./ryu/controller/controller.py
Error:
loading app ./ryu/controller/controller.py
Traceback (most recent call last):
File "./bin/ryu-manager", line 19, in <module>
main()
File "/home/saber/ryu/ryu/cmd/manager.py", line 98, in main
app_mgr.load_apps(app_lists)
File "/home/saber/ryu/ryu/base/app_manager.py", line 415, in load_apps
cls = self.load_app(app_cls_name)
File "/home/saber/ryu/ryu/base/app_manager.py", line 392, in load_app
mod = utils.import_module(name)
File "/home/saber/ryu/ryu/utils.py", line 99, in import_module
return _import_module_file(modname)
File "/home/saber/ryu/ryu/utils.py", line 88, in _import_module_file
return load_source(modname, abspath)
File "/home/saber/ryu/ryu/utils.py", line 42, in load_source
return loader.load_module(name)
File "<frozen importlib._bootstrap_external>", line 522, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 1027, in load_module
File "<frozen importlib._bootstrap_external>", line 852, in load_module
File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/saber/ryu/ryu/controller/controller.py", line 58, in <module>
CONF.register_cli_opts([
File "/home/saber/.local/lib/python3.8/site-packages/oslo_config/cfg.py", line 2077, in __inner
result = f(self, *args, **kwargs)
File "/home/saber/.local/lib/python3.8/site-packages/oslo_config/cfg.py", line 2363, in register_cli_opts
self.register_cli_opt(opt, group, clear_cache=False)
File "/home/saber/.local/lib/python3.8/site-packages/oslo_config/cfg.py", line 2081, in __inner
return f(self, *args, **kwargs)
File "/home/saber/.local/lib/python3.8/site-packages/oslo_config/cfg.py", line 2355, in register_cli_opt
raise ArgsAlreadyParsedError("cannot register CLI option")
oslo_config.cfg.ArgsAlreadyParsedError: arguments already parsed: cannot register CLI option

Python : 'Doc2Vec' object has no attribute 'dv'

Thanks for advice, I have edited the question
I meet this: AttributeError: 'Doc2Vec' object has no attribute 'dv'
The error comes from
Traceback (most recent call last):
File "F:\Projects\项目代码\爬虫程序\headline\main.py", line 13, in <module>
execute(["scrapy", "crawl", "head_spider", '-a', 'key='+sys.argv[1]])
File "C:\Python310\lib\site-packages\scrapy\cmdline.py", line 144, in execute
cmd.crawler_process = CrawlerProcess(settings)
File "C:\Python310\lib\site-packages\scrapy\crawler.py", line 290, in __init__
super().__init__(settings)
File "C:\Python310\lib\site-packages\scrapy\crawler.py", line 167, in __init__
self.spider_loader = self._get_spider_loader(settings)
File "C:\Python310\lib\site-packages\scrapy\crawler.py", line 161, in _get_spider_loader
return loader_cls.from_settings(settings.frozencopy())
File "C:\Python310\lib\site-packages\scrapy\spiderloader.py", line 67, in from_settings
return cls(settings)
File "C:\Python310\lib\site-packages\scrapy\spiderloader.py", line 24, in __init__
self._load_all_spiders()
File "C:\Python310\lib\site-packages\scrapy\spiderloader.py", line 51, in _load_all_spiders
for module in walk_modules(name):
File "C:\Python310\lib\site-packages\scrapy\utils\misc.py", line 88, in walk_modules
submod = import_module(fullpath)
File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "F:\Projects\项目代码\爬虫程序\headline\headline\spiders\head_spider.py", line 6, in <module>
from headline.items import Artical
File "F:\Projects\项目代码\爬虫程序\headline\headline\items.py", line 20, in <module>
model = Doc2Vec.load('D:/pyspace/headline/headline/utils/model3/doc2vec.model')
File "C:\Python310\lib\site-packages\gensim\models\doc2vec.py", line 813, in load
raise ae
File "C:\Python310\lib\site-packages\gensim\models\doc2vec.py", line 807, in load
return super(Doc2Vec, cls).load(*args, rethrow=True, **kwargs)
File "C:\Python310\lib\site-packages\gensim\models\word2vec.py", line 1937, in load
raise ae
File "C:\Python310\lib\site-packages\gensim\models\word2vec.py", line 1930, in load
model = super(Word2Vec, cls).load(*args, **kwargs)
File "C:\Python310\lib\site-packages\gensim\utils.py", line 486, in load
obj._load_specials(fname, mmap, compress, subname)
File "C:\Python310\lib\site-packages\gensim\models\word2vec.py", line 1946, in _load_specials
super(Word2Vec, self)._load_specials(*args, **kwargs)
File "C:\Python310\lib\site-packages\gensim\utils.py", line 517, in _load_specials
getattr(self, attrib)._load_specials(cfname, mmap, compress, subname)
File "C:\Python310\lib\site-packages\gensim\utils.py", line 1521, in new_func1
return func(*args, **kwargs)
File "C:\Python310\lib\site-packages\gensim\models\doc2vec.py", line 326, in docvecs
return self.dv
AttributeError: 'Doc2Vec' object has no attribute 'dv'
the 'D:/pyspace/headline/headline/utils/model3/doc2vec.model' is an model that has ever been trained.
gensim version is 4.1.2
Django version is 4.0.3
I don't know what should I do to solve this problem. Thanks for help
It may be the problem of your version, or you can try to correct your code "model.doc2vec"

ImportError: Can't determine version for numexpr caused by scrapy

I'm trying to run a scrapy problem downloaded on the Internat,when I try to start running a scrapy crawl this program, there turn to the following error, I don't know the cause, I don't know is it pandas version problem? or numpy? After changed the bottleneck_ floader name, nothing changed.
The code:
Scarpy crawl guba
then tips are following:
Traceback (most recent call last):
File "C:\Users\Saraph\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Saraph\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Saraph\anaconda3\Scripts\scrapy.exe\__main__.py", line 7, in <module>
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\cmdline.py", line 144, in execute
cmd.crawler_process = CrawlerProcess(settings)
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\crawler.py", line 280, in __init__
super().__init__(settings)
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\crawler.py", line 152, in __init__
self.spider_loader = self._get_spider_loader(settings)
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\crawler.py", line 146, in _get_spider_loader
return loader_cls.from_settings(settings.frozencopy())
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\spiderloader.py", line 67, in from_settings
return cls(settings)
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\spiderloader.py", line 24, in __init__
self._load_all_spiders()
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\spiderloader.py", line 51, in _load_all_spiders
for module in walk_modules(name):
File "C:\Users\Saraph\anaconda3\lib\site-packages\scrapy\utils\misc.py", line 88, in walk_modules
submod = import_module(fullpath)
File "C:\Users\Saraph\anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Saraph\Desktop\github\guba\guba_crawler-master\guba_stock_reviews_spider\spiders\guba.py", line 3, in <module>
import pandas as pd
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\__init__.py", line 48, in <module>
from pandas.core.api import (
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\api.py", line 29, in <module>
from pandas.core.arrays import Categorical
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\arrays\__init__.py", line 1, in <module>
from pandas.core.arrays.base import (
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\arrays\base.py", line 68, in <module>
from pandas.core import (
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\arraylike.py", line 21, in <module>
from pandas.core.ops.common import unpack_zerodim_and_defer
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\ops\__init__.py", line 33, in <module>
from pandas.core.ops.array_ops import ( # noqa:F401
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\ops\array_ops.py", line 48, in <module>
import pandas.core.computation.expressions as expressions
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\computation\expressions.py", line 19, in <module>
from pandas.core.computation.check import NUMEXPR_INSTALLED
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\core\computation\check.py", line 3, in <module>
ne = import_optional_dependency("numexpr", errors="warn")
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\compat\_optional.py", line 142, in import_optional_dependency
version = get_version(module_to_get)
File "C:\Users\Saraph\anaconda3\lib\site-packages\pandas\compat\_optional.py", line 68, in get_version
raise ImportError(f"Can't determine version for {module.__name__}")
ImportError: Can't determine version for numexpr

flask unable to run db migrate - NameError: name 'conn_uniques' is not defined

Every time I update my models I have to delete and reinitialize the database.
./manage.py db init
and then initial
./manage.py db migrate
work but every subsequent ./manage.py db migrate fails with the following error:
INFO [alembic.migration] Context impl SQLiteImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "manage.py", line 110, in <module>
manager.run()
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages
/flask_script/__init__.py", line 405, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages
/flask_script/__init__.py", line 384, in handle
return handle(app, *positional_args, **kwargs)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages
/flask_script/commands.py", line 145, in handle
return self.run(*args, **kwargs)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages
/flask_migrate/__init__.py", line 80, in migrate
command.revision(config, message, autogenerate = True, sql = sql)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages /alembic/command.py", line 97, in revision
script.run_env()
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages /alembic/script.py", line 199, in run_env
util.load_python_file(self.dir, 'env.py')
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/util.py", line 199, in load_python_file
module = load_module(module_id, path)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/compat.py", line 49, in load_module
return machinery.SourceFileLoader(module_id, path).load_module()
File "<frozen importlib._bootstrap>", line 539, in _check_name_wrapper
File "<frozen importlib._bootstrap>", line 1614, in load_module
File "<frozen importlib._bootstrap>", line 596, in _load_module_shim
File "<frozen importlib._bootstrap>", line 1220, in load
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "migrations/env.py", line 72, in <module>
run_migrations_online()
File "migrations/env.py", line 65, in run_migrations_online
context.run_migrations()
File "<string>", line 7, in run_migrations
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/environment.py", line 652, in run_migrations
self.get_context().run_migrations(**kw)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages /alembic/migration.py", line 210, in run_migrations
self):
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/command.py", line 83, in retrieve_migrations
autogen._produce_migration_diffs(context, template_args, imports)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/autogenerate/api.py", line 143, in _produce_migration_diffs
autogen_context, object_filters, include_schemas)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/autogenerate/api.py", line 198, in _produce_net_changes
inspector, metadata, diffs, autogen_context)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/autogenerate/compare.py", line 69, in _compare_tables
diffs, autogen_context, inspector)
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/autogenerate/compare.py", line 223, in _compare_indexes_and_uniques
metadata_indexes
File "/home/sergi/.virtualenvs/flaskvenv/lib/python3.4/site-packages/alembic/ddl/sqlite.py", line 56, in correct_for_autogen_constraints
conn_uniques.remove(idx)
NameError: name 'conn_uniques' is not defined
I use the SQLite3 database. I had my models split into several files but put them in a single file but no help. I also tried upgrading flask-migrate, flask-sqlalchemy and other packages but also no help. What could be wrong?
Update:
I am using the Alembic version 0.6.2
It's really odd, but a few of the 0.6.x releases of Alembic appear to have this undefined symbol.
The mistake was corrected in release 0.6.7. Here is the commit that shows how this line was corrected: https://github.com/zzzeek/alembic/commit/ead05ce48d40d4235b2395972fd1a6efb96d414c
Pretty sure if you upgrade to 0.6.7 or newer the problem will be resolved.

Categories

Resources