Login to the Azure-container-service fails with error 'bool' object has no attribute 'rstrip' using Azure CLI - azure-cli

Issue :
az acr login --name test1acr
Azure CLI version : azure-cli (2.0.24)
docker version :17.12.0-ce
Error : 'bool' object has no attribute 'rstrip' Traceback (most recent
call last): File
"/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/knack/cli.py",
line 193, in invoke
cmd_result = self.invocation.execute(args) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/commands/init.py", line 319, in execute
six.reraise(*sys.exc_info()) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/commands/init.py", line 292, in execute
result = cmd(params) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/commands/init.py", line 169, in call
return super(AzCliCommand, self).call(*args, **kwargs) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/knack/commands.py",
line 109, in call
return self.handler(*args, **kwargs) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/init.py",
line 328, in default_command_handler
result = op(**command_args) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/command_modules/acr/custom.py",
line 195, in acr_login
password=password) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/command_modules/acr/_docker_utils.py",
line 194, in get_login_credentials
only_refresh_token=True) File "/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/command_modules/acr/_docker_utils.py",
line 150, in _get_credentials
password = _get_aad_token(login_server, only_refresh_token, repository, permission) File
"/home/vagrant/lib/azure-cli/lib/python2.7/site-packages/azure/cli/command_modules/acr/_docker_utils.py",
line 35, in _get_aad_token
login_server = login_server.rstrip('/') AttributeError: 'bool' object has no attribute 'rstrip'

Azure cli context seems missing in the docker utils.
The below changes worked for me by modifying the _docker_utils file
File: /opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_docker_utils.py
Line Number: 150
- password = _get_aad_token(login_server, only_refresh_token, repository, permission)
+ password = _get_aad_token( cli_ctx , login_server, only_refresh_token, repository, permission)

It's best to move back to 2.0.23 for now, as 2.0.24 introduced a bug.

Related

Cannot connect to MySQL database in TensorFlow Extended

I am having problems using a MySQL database as a metadata database in a TensorFlow Extended pipeline.
I used the penguin template to set up a very simple pipeline and also set up a MySQL database locally.
The only thing I changed in the code was using
tfx.orchestration.metadata.mysql_metadata_connection_config as the metadata_connection_config input to the pipeline instead of tfx.orchestration.metadata.sqlite_metadata_connection_config
from tfx import v1 as tfx
# [...] Add a simple CsvExampleGen
tfx.dsl.Pipeline(
pipeline_name=pipeline_name,
pipeline_root=pipeline_root,
components=components,
metadata_connection_config=tfx.orchestration.metadata
.mysql_metadata_connection_config(
host="localhost",
port=3306,
database="ml_metadata",
username="root",
password="password"),
beam_pipeline_args=beam_pipeline_args,
)
Running this code results in the following error message:
[2021-11-17 12:02:16,948] {taskinstance.py:1270} INFO - Marking task as FAILED. dag_id=penguin_pipeline, task_id=CsvExampleGen, execution_date=20211117T110208, start_date=20211117T110212, end_date=20211117T110216
[2021-11-17 12:02:16,966] {standard_task_runner.py:88} ERROR - Failed to execute job 101 for task CsvExampleGen
Traceback (most recent call last):
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/task/task_runner/standard_task_runner.py", line 85, in _start_by_fork
args.func(args, dag=self.dag)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/utils/cli.py", line 92, in wrapper
return f(*args, **kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/commands/task_command.py", line 292, in task_run
_run_task_by_selected_method(args, dag, ti)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/commands/task_command.py", line 107, in _run_task_by_selected_method
_run_raw_task(args, ti)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/commands/task_command.py", line 180, in _run_raw_task
ti._run_raw_task(
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/utils/session.py", line 70, in wrapper
return func(*args, session=session, **kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1332, in _run_raw_task
self._execute_task_with_callbacks(context)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1458, in _execute_task_with_callbacks
result = self._execute_task(context, self.task)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1514, in _execute_task
result = execute_callable(context=context)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/operators/python.py", line 151, in execute
return_value = self.execute_callable()
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/operators/python.py", line 162, in execute_callable
return self.python_callable(*self.op_args, **self.op_kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/airflow/airflow_component.py", line 76, in _airflow_component_launcher
launcher.launch()
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/launcher/base_component_launcher.py", line 191, in launch
execution_decision = self._run_driver(self._input_dict, self._output_dict,
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/launcher/base_component_launcher.py", line 152, in _run_driver
with self._metadata_connection as m:
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/metadata.py", line 152, in __enter__
raise RuntimeError(
RuntimeError: Failed to establish connection to Metadata storage with error: mysql_real_connect failed: errno: , error:
In this log I was using AirFlow, but the same exception message is shown if I run a LocalDagRunner:
Exception has occurred: RuntimeError
Failed to establish connection to Metadata storage with error: mysql_real_connect failed: errno: , error:
I have tried changing the host to "127.0.0.1", but this didn't change anything. Anyone had a similar issue or maybe see an apparent error in my approach?
The MySQL server is version 8.0 and I am using TensorFlow Extended version 1.4.0

How to fix AttributeError: 'bytes' object has no attribute 'encode' if using mysql?

Django development server was running fine using mysql up to yesterday. But today I get the error AttributeError: 'bytes' object has no attribute 'encode'.
I created a new blank django instance by running django-admin startproject newProject. It runs with 'ENGINE': 'django.db.backends.sqlite3'. But produces same error when I change it to 'ENGINE': 'django.db.backends.mysql'
System specification:
os: manjaro linux
virtual environment python version: 3.6
Django version: 2.2
MariaDB version: 10.3.15-1
Have not updated any related package in last 3 days.
The error:
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 120, in inner_run
self.check_migrations()
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/core/management/base.py", line 453, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/migrations/executor.py", line 18, in __init__
self.loader = MigrationLoader(self.connection)
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/migrations/loader.py", line 49, in __init__
self.build_graph()
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/migrations/loader.py", line 212, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 73, in applied_migrations
if self.has_table():
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 56, in has_table
return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/base/base.py", line 256, in cursor
return self._cursor()
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/base/base.py", line 233, in _cursor
self.ensure_connection()
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
self.connect()
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/base/base.py", line 197, in connect
self.init_connection_state()
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 232, in init_connection_state
if self.features.is_sql_auto_is_null_enabled:
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/mysql/features.py", line 82, in is_sql_auto_is_null_enabled
cursor.execute('SELECT ##SQL_AUTO_IS_NULL')
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/utils.py", line 103, in execute
sql = self.db.ops.last_executed_query(self.cursor, sql, params)
File "/srv/http/python/env/env36/lib/python3.6/site-packages/django/db/backends/mysql/operations.py", line 147, in last_executed_query
query = query.encode(errors='replace')
AttributeError: 'bytes' object has no attribute 'encode'
How do I fix this ?
Thank to Martijn, I have fixed this.
In the source, stable 2.2 branch line 146 of django/db/backends/mysql/operations.py is
query = query.decode(errors='replace')
In my system path/to/virtualenv/django/db/backends/mysql/operations.py was like
# query = query.decode(errors='replace')
query = query.encode(errors='replace')
I changed it to
query = query.decode(errors='replace')
# query = query.encode(errors='replace')
It is working correctly now.

ERPNext OperationalError (2003, "Can't connect to MySQL server on u'localhost' ([Errno 22] Invalid argument)")

I’m getting the below error when trying to install a new site using command
bench --site site1.local install-app erpnext
This is a new installation on Windows Linux SubSustem running Ubuntu.
I’m able to login into mysql through command line using user root and the password which I had set during installation.
pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on u’localhost’ ([Errno 22] Invalid argument)”)
swadeesh#SWAD-PC:~/frappe-bench$ bench --site site1.local install-app erpnext
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/commands/site.py", line 169, in install_app
_install_app(app, verbose=context.verbose)
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/installer.py", line 52, in install_app
frappe.clear_cache()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/__init__.py", line 555, in clear_cache
frappe.cache_manager.clear_user_cache()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/cache_manager.py", line 42, in clear_user_cache
clear_global_cache()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/cache_manager.py", line 48, in clear_global_cache
clear_website_cache()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/website/render.py", line 291, in clear_cache
for method in frappe.get_hooks("website_clear_cache"):
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/__init__.py", line 931, in get_hooks
hooks = _dict(cache().get_value("app_hooks", load_app_hooks))
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 79, in get_value
val = generator()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/__init__.py", line 905, in load_app_hooks
for app in [app_name] if app_name else get_installed_apps(sort=True):
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/__init__.py", line 869, in get_installed_apps
installed = json.loads(db.get_global("installed_apps") or "[]")
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/database/database.py", line 692, in get_global
return self.get_default(key, user)
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/database/database.py", line 696, in get_default
d = self.get_defaults(key, parent)
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/database/database.py", line 714, in get_defaults
defaults = frappe.defaults.get_defaults(parent)
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/defaults.py", line 77, in get_defaults
globald = get_defaults_for()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/defaults.py", line 204, in get_defaults_for
where parent = %s order by creation""", (parent,), as_dict=1)
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql
self.connect()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/database/database.py", line 75, in connect
self._conn = self.get_connection()
File "/home/swadeesh/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 89, in get_connection
local_infile = frappe.conf.local_infile)
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/__init__.py", line 94, in Connect
return Connection(*args, **kwargs)
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 325, in __init__
self.connect()
File "/home/swadeesh/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 630, in connect
raise exc
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on u'localhost' ([Errno 22] Invalid argument)")
I think you've enabled mysqld_safe mode.
check if you've enable mysqld_safe mode using : sudo ps -aux | grep "mysqld_safe"
if it's appear in output results then you've to disable it using following commands:
Stop mysql service and start it using /etc/init.d/mysql start to start it in normal mode.
Why you're not able to connect using Python Client because root user doesn't need mysql password for login into mysql but you will not be able to connect it using non-root user because of mysqld_safe mode on.

1146 "app_name.django_site missing"

I am using Django 1.11 for making an app 'cnfs', and I am using MYSQL database with it. I am constantly facing this issue where I am getting an error like this when I type the following code:
$python manage.py migrate
System check identified some issues: WARNINGS: ?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default' HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-sql-mode Operations to perform: Apply all migrations: admin, auth, cnfs, contenttypes, sites Running migrations: No migrations to apply. Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/management/init.py", line 363, in execute_from_command_line utility.execute() File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/management/init.py", line 355, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv self.execute(*args, **cmd_options) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute output = self.handle(*args, **options) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 227, in handle self.verbosity, self.interactive, connection.alias, apps=post_migrate_apps, plan=plan, File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/management/sql.py", line 53, in emit_post_migrate_signal **kwargs File "/home/ubuntu/.local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 193, in send for receiver in self._live_receivers(sender) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/contrib/sites/management.py", line 20, in create_default_site if not Site.objects.using(using).exists(): File "/home/ubuntu/.local/lib/python2.7/site-packages/django/db/models/query.py", line 670, in exists return self.query.has_results(using=self.db) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 517, in has_results return compiler.has_results() File "/home/ubuntu/.local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 845, in has_results return bool(self.execute_sql(SINGLE)) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 886, in execute_sql raise original_exception django.db.utils.ProgrammingError: (1146, "Table 'cnfs.django_site' doesn't exist")
I have literally spent days on this, I did not face this issue when i was using the default django database engine, sqlite3.
I have tried doing this:
$python manage.py migrate sites
My SITE_ID setting is set to 1.
I tried removing the 'django.contrib.sites' thing from the INSTALLED_APPS setting, but that throws this error:
Internal Server Error: / Traceback (most recent call last): File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/home/ubuntu/.local/lib/python2.7/site-packages/django/utils/deprecation.py", line 138, in call response = self.process_request(request) File "/home/ubuntu/.local/lib/python2.7/site-packages/subdomains/middleware.py", line 62, in process_request super(SubdomainURLRoutingMiddleware, self).process_request(request) File "/home/ubuntu/.local/lib/python2.7/site-packages/subdomains/middleware.py", line 38, in process_request (self.get_domain_for_request(request), request.get_host())) File "/home/ubuntu/.local/lib/python2.7/site-packages/subdomains/middleware.py", line 31, in get_domain_for_request return get_domain() File "/home/ubuntu/.local/lib/python2.7/site-packages/subdomains/utils.py", line 12, in current_site_domain from django.contrib.sites.models import Site File "/home/ubuntu/.local/lib/python2.7/site-packages/django/contrib/sites/models.py", line 84, in class Site(models.Model): File "/home/ubuntu/.local/lib/python2.7/site-packages/django/db/models/base.py", line 118, in new "INSTALLED_APPS." % (module, name) RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Any suggestions would be much appreciated.
Thanks.
uncomment the django.contrib.sites from installed apps
then
python manage.py migrate sites
python manage.py migrate
if you have few table in the database, drop the tables and then run this

FIWARE IDM installation error

I tried to install Fiware IDM in Ubuntu 12.04 from scratch (just only Ubuntu 12.04 was installed, no any more packages). I have followed the guide https://github.com/ging/fi-ware-idm/wiki/Installation-guide
Installation finished OK, but when I try to start fi-lab home page, http://localhost:8000, I've got the following error:
DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_config instead.
DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_config instead.
Validating models...
0 errors found
July 09, 2015 - 13:17:37
Django version 1.6.11, using settings 'openstack_dashboard.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
DEBUG:idm_logger:Creating a new internal keystoneclient connection to https://127.0.0.1:5000/v3.
InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
WARNING:py.warnings:InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
Recoverable error: SSL exception connecting to https://127.0.0.1:5000/v3/auth/tokens
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
return self.application(environ, start_response)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
self.load_middleware()
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware
mw_instance = mw_class()
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/middleware/locale.py", line 24, in __init__
for url_pattern in get_resolver(None).url_patterns:
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 365, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/juan/idm/horizon/openstack_dashboard/urls.py", line 36, in <module>
from openstack_dashboard.dashboards.idm_admin.user_accounts \
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/views.py", line 27, in <module>
from openstack_dashboard.dashboards.idm_admin.user_accounts \
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 202, in <module>
class UpdateAccountForm(forms.SelfHandlingForm, UserAccountsLogicMixin, fiware_auth.TemplatedEmailMixin):
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 209, in UpdateAccountForm
choices=get_account_choices())
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 179, in get_account_choices
use_idm_account=True),
File "/home/juan/idm/horizon/openstack_dashboard/fiware_api/keystone.py", line 783, in get_basic_role
exceptions.handle(request)
File "/home/juan/idm/horizon/horizon/exceptions.py", line 324, in handle
messages.error(request, message or log_entry)
File "/home/juan/idm/horizon/horizon/messages.py", line 83, in error
fail_silently=fail_silently)
File "/home/juan/idm/horizon/horizon/messages.py", line 41, in add_message
if not horizon_message_already_queued(request, message):
File "/home/juan/idm/horizon/horizon/messages.py", line 28, in horizon_message_already_queued
if request.is_ajax():
AttributeError: 'NoneType' object has no attribute 'is_ajax'
Does anybody know whether we should install additional packages?
For development purposes, change this variable
from
OPENSTACK_KEYSTONE_URL = "https://%s:5000/v3" % OPENSTACK_HOST to
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
inside idm/horizon/openstack_dashboard/loca/local_settings.py (arround 130th line)