airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Checking roles and users list in Web UI, give me an error

Open nediGit opened this issue 4 years ago • 6 comments

Apache Airflow version

2.1.2

Operating System

Centos 7

Versions of Apache Airflow Providers

apache-airflow-providers-ftp==2.0.0 apache-airflow-providers-http==2.0.1 apache-airflow-providers-imap==2.0.0 apache-airflow-providers-microsoft-mssql==2.0.0 apache-airflow-providers-odbc==2.0.0 apache-airflow-providers-postgres==2.2.0 apache-airflow-providers-sqlite==2.0.0

Deployment

Composer

Deployment details

Follow the installation steps in the documentation, nothing more, nothing less

What happened

I try to check the users list, or roles, from the webIU, and give me these error

What you expected to happen

See the list of the users or roles

How to reproduce

Install Apache Airflow 2.1.2, using SQLite, no changes at all

Anything else

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

nediGit avatar Nov 12 '21 13:11 nediGit

Thanks for opening your first issue here! Be sure to follow the issue template!

boring-cyborg[bot] avatar Nov 12 '21 13:11 boring-cyborg[bot]

Can you please include the error message or screenshots?

bbovenzi avatar Nov 12 '21 14:11 bbovenzi

Sure, selecting List Users image

And the error:

Something bad has happened.
Please consider letting us know by creating a bug report using GitHub.

Python version: 3.6.8
Airflow version: 2.1.2
Node: robots-kube003.nosis.interno
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
    return f(self, *args, **kwargs)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask_appbuilder/views.py", line 551, in list
    widgets = self._list()
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask_appbuilder/baseviews.py", line 1136, in _list
    form = self.search_form.refresh()
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask_appbuilder/forms.py", line 329, in refresh
    form = self(obj=obj)
  File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 208, in __call__
    return type.__call__(cls, *args, **kwargs)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask_wtf/form.py", line 87, in __init__
    super(FlaskForm, self).__init__(formdata=formdata, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 268, in __init__
    super(Form, self).__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
  File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 51, in __init__
    field = meta.bind_field(self, unbound_field, options)
  File "/usr/local/lib/python3.6/site-packages/wtforms/meta.py", line 27, in bind_field
    return unbound_field.bind(form=form, **options)
  File "/usr/local/lib/python3.6/site-packages/wtforms/fields/core.py", line 376, in bind
    return self.field_class(*self.args, **kw)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/flask_appbuilder/fields.py", line 182, in __init__
    "allow_blank=True does not do anything for QuerySelectMultipleField."
  File "/usr/lib64/python3.6/warnings.py", line 99, in _showwarnmsg
    msg.file, msg.line)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/airflow/settings.py", line 114, in custom_show_warning
    write_console.print(msg, soft_wrap=True)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/rich/console.py", line 1601, in print
    self._buffer.extend(new_segments)
  File "/home/[email protected]/.local/lib/python3.6/site-packages/rich/console.py", line 815, in __exit__
    self._exit_buffer()
  File "/home/[email protected]/.local/lib/python3.6/site-packages/rich/console.py", line 774, in _exit_buffer
    self._check_buffer()
  File "/home/[email protected]/.local/lib/python3.6/site-packages/rich/console.py", line 1824, in _check_buffer
    self.file.write(text)
OSError: [Errno 5] Input/output error

nediGit avatar Nov 12 '21 17:11 nediGit

Hmm, this very much looks like a Flask-Appbuilder bug. Unfortunately the last four stacks (the rich part) is masking the real error here, it raises an exception when trying to write the actual error. Not sure if there’s a way to disable Rich so we can get the actual problem.

uranusjr avatar Nov 15 '21 06:11 uranusjr

@willmcgugan Do you happen to know what would cause the OSError: [Errno 5] Input/output error exception to be reached so maybe we can fix that first?

uranusjr avatar Nov 15 '21 06:11 uranusjr

Is this still happens in main version? We upgraded flask versions. @nediGit can you please check?

eladkal avatar Aug 06 '22 07:08 eladkal

This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.

github-actions[bot] avatar Sep 06 '22 00:09 github-actions[bot]

This issue has been closed because it has not received response from the issue author.

github-actions[bot] avatar Sep 13 '22 00:09 github-actions[bot]