kennyth01 opened a new issue #19804:
URL: https://github.com/apache/airflow/issues/19804
### Apache Airflow version
2.0.2
### Operating System
any linux OS
### Versions of Apache Airflow Providers
apache-airflow-providers-databricks==2.0.2
apache-airflow-providers-ftp==1.1.0
apache-airflow-providers-http==2.0.0
apache-airflow-providers-imap==1.0.1
apache-airflow-providers-slack==4.0.0
apache-airflow-providers-sqlite==1.0.2
apache-airflow-providers-ssh==1.3.0
### Deployment
Virtualenv installation
### Deployment details
In my local mac, i use a virtualenv
`virtualenv -p python3 airflow_virtualenv
cd airflow_virtualenv/bin
source $AIRFLOW_VIRTUAL_ENV_PATH/airflow_virtualenv/bin/activate
cat requirements.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1
python -m pip install`
then upon executing
`airflow db init`
error will be showing.
### What happened
Executing airflow db init produces me this error:
` airflow db init
DB: sqlite:////Users/kenneth/airflow/builds/airflow.db
[2021-11-24 18:33:23,505] {db.py:910} INFO - Creating tables
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "/Users/kenneth/airflow-venv/airflow_virtualenv/bin/airflow", line 8,
in <module>
sys.exit(main())
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/__main__.py",
line 48, in main
args.func(args)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/cli/cli_parser.py",
line 48, in command
return func(*args, **kwargs)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/cli/commands/db_command.py",
line 31, in initdb
db.initdb()
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/utils/session.py",
line 70, in wrapper
return func(*args, session=session, **kwargs)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/utils/db.py",
line 592, in initdb
upgradedb(session=session)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/utils/session.py",
line 67, in wrapper
return func(*args, **kwargs)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/utils/db.py",
line 911, in upgradedb
command.upgrade(config, 'heads')
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/command.py",
line 320, in upgrade
script.run_env()
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/base.py",
line 563, in run_env
util.load_python_file(self.dir, "env.py")
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py",
line 92, in load_python_file
module = load_module_py(module_id, path)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py",
line 108, in load_module_py
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/migrations/env.py",
line 107, in <module>
run_migrations_online()
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/migrations/env.py",
line 101, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/runtime/environment.py",
line 851, in run_migrations
self.get_context().run_migrations(**kw)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/runtime/migration.py",
line 608, in run_migrations
for step in self._migrations_fn(heads, self):
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/command.py",
line 309, in upgrade
return script._upgrade_revs(revision, rev)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/base.py",
line 439, in _upgrade_revs
for script in reversed(list(revs))
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/revision.py",
line 798, in iterate_revisions
assert_relative_length=assert_relative_length,
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/revision.py",
line 1396, in _collect_upgrade_revisions
assert_relative_length=assert_relative_length,
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/revision.py",
line 1193, in _parse_upgrade_target
return self.get_revisions(target)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/revision.py",
line 528, in get_revisions
id_ # type:ignore [arg-type]
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/revision.py",
line 747, in _resolve_revision_number
self._revision_map
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py",
line 893, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/revision.py",
line 189, in _revision_map
for revision in self._generator():
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/base.py",
line 136, in _load_revisions
script = Script._from_filename(self, vers, file_)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/script/base.py",
line 999, in _from_filename
module = util.load_python_file(dir_, filename)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py",
line 92, in load_python_file
module = load_module_py(module_id, path)
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py",
line 108, in load_module_py
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/migrations/versions/82b7c48c147f_remove_can_read_permission_on_config_.py",
line 29, in <module>
from airflow.www.app import create_app
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/www/app.py",
line 40, in <module>
from airflow.www.extensions.init_views import (
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/www/extensions/init_views.py",
line 29, in <module>
from airflow.www.views import
lazy_add_provider_discovered_options_to_connection_form
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/www/views.py",
line 123, in <module>
from airflow.www import auth, utils as wwwutils
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/airflow/www/utils.py",
line 24, in <module>
import markdown
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/markdown/__init__.py",
line 29, in <module>
from .core import Markdown, markdown, markdownFromFile # noqa: E402
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/markdown/core.py",
line 26, in <module>
from . import util
File
"/Users/kenneth/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/markdown/util.py",
line 88, in <module>
INSTALLED_EXTENSIONS = metadata.entry_points(group='markdown.extensions')
TypeError: entry_points() got an unexpected keyword argument 'group'`
### What you expected to happen
it should run as per normal, i remember testing this 2 weeks back and all
are working without issue, then for whatever reason this error suddenly
appears. Even in my bitbucket pipelines CI/CD it is working last time, now it
is not, so its definitely not my local os issue
### How to reproduce
`virtualenv -p python3 airflow_virtualenv
cd airflow_virtualenv/bin
source $AIRFLOW_VIRTUAL_ENV_PATH/airflow_virtualenv/bin/activate
cat requirements.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1
python -m pip install`
then upon executing
`airflow db init`
error will be showing.
### Anything else
Suddenly occured, im not sure if something got changed somewhere on the
packages
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]