Bug: default config triggers warning with lastest pip install
xatru42 opened this issue · 1 comments
installed opentaxii as per documentaiton using virtualenv and then install everything inside using pip.
starting dev server or launching the initial setup triggers following warning (inbetween):
(venv) root@taxiiserver:/venv # opentaxii-sync-data -f /venv/data-configuration.yml /venv/lib/python3.11/site-packages/opentaxii/config.py:150: UserWarning: Ignoring invalid configuration item 'services'. warn(f"Ignoring invalid configuration item '{key}'.") /venv/lib/python3.11/site-packages/opentaxii/config.py:150: UserWarning: Ignoring invalid configuration item 'collections'. warn(f"Ignoring invalid configuration item '{key}'.") /venv/lib/python3.11/site-packages/opentaxii/config.py:150: UserWarning: Ignoring invalid configuration item 'accounts'. warn(f"Ignoring invalid configuration item '{key}'.") 2024-06-13T12:57:51.417633Z [opentaxii.utils] info: api.initialized {api=opentaxii.persistence.sqldb.SQLDatabaseAPI} 2024-06-13T12:57:51.417897Z [opentaxii.server] info: opentaxii.server_configured 2024-06-13T12:57:51.426431Z [opentaxii.utils] info: api.initialized {api=opentaxii.auth.sqldb.SQLDatabaseAPI} 2024-06-13T12:57:51.469322Z [opentaxii.utils] info: sync_services.created {id=inbox_a} 2024-06-13T12:57:51.471720Z [opentaxii.utils] info: sync_services.created {id=inbox_b} 2024-06-13T12:57:51.473999Z [opentaxii.utils] info: sync_services.created {id=discovery_a} 2024-06-13T12:57:51.476243Z [opentaxii.utils] info: sync_services.created {id=collection_management_a} 2024-06-13T12:57:51.478395Z [opentaxii.utils] info: sync_services.created {id=poll_a} 2024-06-13T12:57:51.478525Z [opentaxii.utils] info: sync_services.stats {updated=0, created=5, deleted=0} 2024-06-13T12:57:51.491399Z [opentaxii.utils] info: sync_collections.created {name=collection-a, id=1} 2024-06-13T12:57:51.497017Z [opentaxii.utils] info: sync_collections.created {name=collection-b, id=2} 2024-06-13T12:57:51.502338Z [opentaxii.utils] info: sync_collections.created {name=collection-c, id=3} 2024-06-13T12:57:51.507545Z [opentaxii.utils] info: sync_collections.created {name=col-not-available, id=4} 2024-06-13T12:57:51.507657Z [opentaxii.utils] info: sync_collections.stats {updated=0, created=4, disabled=0, deleted=0} 2024-06-13T12:57:51.512197Z [opentaxii.auth.manager] warning: update_account.unknown_collection {collection=collection-xyz} 2024-06-13T12:57:51.607373Z [opentaxii.utils] info: sync_accounts.created {username=test} 2024-06-13T12:57:51.692279Z [opentaxii.utils] info: sync_accounts.created {username=admin} 2024-06-13T12:57:51.692443Z [opentaxii.utils] info: sync_accounts.stats {updated=0, created=2, deleted=0}
no warnings to appear on startup/opentaxii-sync-data
Steps to reproduce:
get a server
setup new virtualenv server with python3.11
virtualenv env
activate venv
pip install opentaxii
place data-configuration.yml and set environment for OPENTAXII_CONFIG
start the dev server or opentaxxi-sync-data. outputs above warning(s)
Version
opentaxii 0.9.3
Hi, i have a similar problem but when i try create a api root key
opentaxii-add-api-root -t "root" -d "This is a base api root"
/venv/lib/python3.9/site-packages/opentaxii/config.py:150: UserWarning: Ignoring invalid configuration item 'user'.
warn(f"Ignoring invalid configuration item '{key}'.")
/venv/lib/python3.9/site-packages/opentaxii/config.py:150: UserWarning: Ignoring invalid configuration item 'pass'.
warn(f"Ignoring invalid configuration item '{key}'.")
/venv/lib/python3.9/site-packages/opentaxii/config.py:150: UserWarning: Ignoring invalid configuration item 'auth_secret'.
warn(f"Ignoring invalid configuration item '{key}'.")
2024-07-04T19:01:27.875016Z [opentaxii.utils] info: api.initialized {api=opentaxii.persistence.sqldb.SQLDatabaseAPI}
2024-07-04T19:01:27.875344Z [opentaxii.server] info: opentaxii.server_configured
2024-07-04T19:01:27.882387Z [opentaxii.utils] info: api.initialized {api=opentaxii.auth.sqldb.SQLDatabaseAPI}
Traceback (most recent call last):
File "/venv/bin/opentaxii-add-api-root", line 8, in
sys.exit(add_api_root())
File "/venv/lib/python3.9/site-packages/opentaxii/cli/persistence.py", line 110, in add_api_root
app.taxii_server.servers.taxii2.persistence.api.add_api_root(
AttributeError: 'NoneType' object has no attribute 'persistence'