BUG | When using Aerospike with tumbling windows, the config is not loaded
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Start with the traceback: faust/tables/base.py (_new_store_by_url, the data property and on_start) passes the store options to faust/stores/aerospike.py, where get_aerospike_client reads aerospike_config and gets None. Check how a tumbling table's options reach the store compared with a plain table. Done means a tumbling table with Aerospike options starts without the AttributeError, with a test covering that case.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
So, I'm using the latest version of Faust with an Aerospike database for persistence. I have followed the instructions in the project's README.md, but I still get this issue with tumbling windows:
Here is my code:
sum_transactions_table = (
app.Table(
'transactions-sum',
default=float,
partitions=config.faust.partitions,
on_window_close=window_processor,
options={'namespace': 'default', 'client': {'hosts': [('127.0.0.1', 3000)]}},
)
.tumbling(
config.faust.window_closing_time,
expires=timedelta(hours=config.faust.window_expires),
key_index=True
)
)
This produces the following error output:
[2025-01-30 12:42:00,764] [10813] [ERROR] Error configuring aerospike client 'NoneType' object has no attribute 'get'
[2025-01-30 12:42:00,764] [10813] [ERROR] [^Worker]: Error: AttributeError("'NoneType' object has no attribute 'get'")
Traceback (most recent call last):
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/worker.py", line 277, in execute_from_commandline
self.loop.run_until_complete(self._starting_fut)
File "/Users/pedro/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 830, in start
await self._default_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 837, in _default_start
await self._actually_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 861, in _actually_start
await child.maybe_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 889, in maybe_start
await self.start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 830, in start
await self._default_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 837, in _default_start
await self._actually_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 861, in _actually_start
await child.maybe_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 889, in maybe_start
await self.start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 830, in start
await self._default_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 837, in _default_start
await self._actually_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 854, in _actually_start
await self.on_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/tables/manager.py", line 142, in on_start
await self._update_channels()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/tables/manager.py", line 158, in _update_channels
await table.maybe_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 889, in maybe_start
await self.start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 830, in start
await self._default_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 837, in _default_start
await self._actually_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/mode/services.py", line 854, in _actually_start
await self.on_start()
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/tables/base.py", line 218, in on_start
await self.add_runtime_dependency(self.data)
^^^^^^^^^
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/tables/base.py", line 213, in data
self._data = self._new_store()
^^^^^^^^^^^^^^^^^
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/tables/base.py", line 192, in _new_store
return self._new_store_by_url(self._store or self.app.conf.store)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/tables/base.py", line 195, in _new_store_by_url
return stores.by_url(url)(
^^^^^^^^^^^^^^^^^^^
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/stores/aerospike.py", line 70, in __init__
raise ex
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/stores/aerospike.py", line 63, in __init__
self.client = AeroSpikeStore.get_aerospike_client(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pedro/Projects/poc_faust/.venv/lib/python3.12/site-packages/faust/stores/aerospike.py", line 80, in get_aerospike_client
client_config: Dict[Any, Any] = aerospike_config.get(
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
Note that removing the .tumbling() method makes it work. So looks like it is not loading the config from the table.
- Langage dominant
- Python
- Étoiles
- 1.9k
- Forks
- 205
- Merge moyen
- 2 h 2 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de faust-streaming/faust
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 86/100
faust-streaming/faust#804 ·
-
scripts/install script forces use of ./venv virtualenv, impossible to use with virtualenvwrapperOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
faust-streaming/faust#28 · 1 commentaire ·
-
[BUG] SASL PLAINTEXT producer initialization fails : missing sasl_plain_username/passwordPeut-être pris @wbarnha l’a pris il y a 56 jours. Ouverte
faust-streaming/faust#794 · 2 commentaires · 1 réaction · 2 personnes assignées ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 18/100
faust-streaming/faust#670 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 18/100
faust-streaming/faust#666 ·
Toutes les issues de faust-streaming/faust
Issues similaires
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
jxxghp/MoviePilot#7576 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
jbaruch/software-factory#266 ·
Les mainteneurs répondent en général sous 1 jour
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour