Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoteType object has no attribute 'fanout' #221

Open
leobispo opened this issue Aug 6, 2018 · 0 comments
Open

NoteType object has no attribute 'fanout' #221

leobispo opened this issue Aug 6, 2018 · 0 comments

Comments

@leobispo
Copy link

leobispo commented Aug 6, 2018

Hi guys,

I am getting the following error on the celery worker.

[2018-08-06 18:47:58,069: INFO/MainProcess] Received task: stream_framework.tasks.fanout_operation_hi_priority[d736e5c6-2da0-4111-a076-16097163b1f5]  
[2018-08-06 18:47:58,073: WARNING/ForkPoolWorker-2] None
[2018-08-06 18:47:58,073: WARNING/ForkPoolWorker-2] None
[2018-08-06 18:47:58,073: WARNING/ForkPoolWorker-2] [4]
[2018-08-06 18:47:58,074: WARNING/ForkPoolWorker-2] None
[2018-08-06 18:47:58,090: ERROR/ForkPoolWorker-1] Task stream_framework.tasks.fanout_operation_hi_priority[03a32a7f-cbc2-4c02-ab58-7f65951e6cbf] raised unexpected: AttributeError("'NoneType' object has no attribute 'fanout'",)
Traceback (most recent call last):
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/stream_framework/tasks.py", line 18, in fanout_operation_hi_priority
    return fanout_operation(feed_manager, feed_class, user_ids, operation, operation_kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/local.py", line 191, in __call__
    return self._get_current_object()(*a, **kw)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/trace.py", line 642, in __protected_call__
    return orig(self, *args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/task.py", line 375, in __call__
    return self.run(*args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/stream_framework/tasks.py", line 11, in fanout_operation
    feed_manager.fanout(user_ids, feed_class, operation, operation_kwargs)
AttributeError: 'NoneType' object has no attribute 'fanout'[2018-08-06 18:47:58,090: ERROR/ForkPoolWorker-2] Task stream_framework.tasks.fanout_operation_hi_priority[d736e5c6-2da0-4111-a076-16097163b1f5] raised unexpected: AttributeError("'NoneType' object has no attribute 'fanout'",)
Traceback (most recent call last):
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/stream_framework/tasks.py", line 18, in fanout_operation_hi_priority
    return fanout_operation(feed_manager, feed_class, user_ids, operation, operation_kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/local.py", line 191, in __call__
    return self._get_current_object()(*a, **kw)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/trace.py", line 642, in __protected_call__
    return orig(self, *args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/celery/app/task.py", line 375, in __call__
    return self.run(*args, **kwargs)
  File "/opt/wespline/env/lib/python3.5/site-packages/stream_framework/tasks.py", line 11, in fanout_operation
    feed_manager.fanout(user_ids, feed_class, operation, operation_kwargs)
AttributeError: 'NoneType' object has no attribute 'fanout'

Any idea... it seems it is trying to deserialize an invalid serialized object... but no idea on how to fix it

Tnx a lot

Complementing... this is what is serialized in the REDIS:

{
	"body": "W1tdLCB7Im9wZXJhdGlvbiI6IG51bGwsICJvcGVyYXRpb25fa3dhcmdzIjogeyJ0cmltIjogdHJ1ZSwgImFjdGl2aXRpZXMiOiBbbnVsbF19LCAidXNlcl9pZHMiOiBbMV0sICJmZWVkX21hbmFnZXIiOiBudWxsLCAiZmVlZF9jbGFzcyI6IG51bGx9LCB7ImNoYWluIjogbnVsbCwgImNob3JkIjogbnVsbCwgImNhbGxiYWNrcyI6IG51bGwsICJlcnJiYWNrcyI6IG51bGx9XQ==",
	"content-encoding": "utf-8",
	"headers": {
		"lang": "py",
		"expires": null,
		"eta": null,
		"origin": "gen7738@app",
		"shadow": null,
		"argsrepr": "()",
		"root_id": "5c575d13-7e7c-4c6a-972e-62cf8900e75d",
		"group": null,
		"task": "stream_framework.tasks.fanout_operation_hi_priority",
		"id": "5c575d13-7e7c-4c6a-972e-62cf8900e75d",
		"kwargsrepr": "{'operation': <function add_operation at 0x7f440d4bcd90>, 'operation_kwargs': {'trim': True, 'activities': [Activity(pinned) 1 45]}, 'user_ids': (1,), 'feed_manager': <feed.managers.PinManager object at 0x7f440d4420f0>, 'feed_class': <class 'feed.pin.PinFeed'>}",
		"parent_id": null,
		"retries": 0,
		"timelimit": [null, null]
	},
	"content-type": "application/json",
	"properties": {
		"body_encoding": "base64",
		"delivery_mode": 2,
		"priority": 0,
		"correlation_id": "5c575d13-7e7c-4c6a-972e-62cf8900e75d",
		"reply_to": "bb14944b-dcea-3cdc-871a-3d76c96d5331",
		"delivery_info": {
			"routing_key": "celery",
			"exchange": ""
		},
		"delivery_tag": "d35dcd61-e4da-41b0-9a05-ed38c719cbf1"
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant