event.effects -= 1 error in circuits

18 views
Skip to first unread message

Mark Scherfling

unread,
May 14, 2020, 6:43:41 PM5/14/20
to circuits

We have successfully used circuits in many solutions. But this error with events.effects has us baffled. There's no extraordinary logic used when using circuits in this circumstance

Apr 15 03:48:04: 2020-04-15 03:48:04,786 INFO [threat_webservice] helper: <system.user.name[threat_lookup_helper] (**)>, cts_search.threatstream
Apr 15 03:48:04: <system.user.name[cts_search.threatstream] (32463dcf-8c22-5dd7-bde6-372226643453)>Unhandled ERROR: 'ThreatServiceLookupEvent' object has no attribute 'effects'
Apr 15 03:48:04: Traceback (most recent call last):
Apr 15 03:48:04: File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 957, in run
Apr 15 03:48:04: self.tick()
Apr 15 03:48:04: File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 917, in tick
Apr 15 03:48:04: self._queue and self.flush()
Apr 15 03:48:04: File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 593, in flushEvents
Apr 15 03:48:04: self.root._flush()
Apr 15 03:48:04: File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 582, in _flush
Apr 15 03:48:04: self._dispatcher(event, channels, self._flush_batch)
Apr 15 03:48:04: File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 695, in _dispatcher
Apr 15 03:48:04: self._eventDone(event, err)
Apr 15 03:48:04: File "/usr/local/lib/python2.7/site-packages/circuits/core/manager.py", line 720, in _eventDone
Apr 15 03:48:04: event.effects -= 1
Apr 15 03:48:04: AttributeError: 'ThreatServiceLookupEvent' 

James Mills

unread,
May 14, 2020, 6:58:37 PM5/14/20
to circuit...@googlegroups.com
Hi Mark,

Can I confirm which version of circuits you are using?

A PyPi release or Git @ HEAD? If Git which SHA?

Kind regards


--
You received this message because you are subscribed to the Google Groups "circuits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circuits-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/circuits-users/2dd57173-45ce-4ab6-959c-fd2574c9085d%40googlegroups.com.

Mark Scherfling

unread,
May 15, 2020, 10:00:11 AM5/15/20
to circuits
circuits==3.2
To unsubscribe from this group and stop receiving emails from it, send an email to circuit...@googlegroups.com.

James Mills

unread,
May 17, 2020, 10:00:03 AM5/17/20
to circuit...@googlegroups.com
Can I ask that you try the Git master version? There hasn't been a release since ~2016 and master is 94 commits ahead of the latest 3.2 release.
The lines in the Traceback you posted don't even match.

Thanks!

cheers
To unsubscribe from this group and stop receiving emails from it, send an email to circuits-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/circuits-users/d4fb971f-4ee5-4a5a-8d81-163a47502f81%40googlegroups.com.

Alessio Deiana

unread,
May 18, 2020, 4:15:57 PM5/18/20
to circuits
ThreatServiceLookupEvent seems to be a custom event.
You may have over written the "effects" attribute. Can you check if you have a function called "effects" in your ThreatServiceLookupEvent?

Alessio Deiana

unread,
May 18, 2020, 4:20:36 PM5/18/20
to circuits
It is also possible that in the constructor of ThreatServiceLookupEvent you are not calling the Event constructor, leading to not initializing the events attribute.

James Mills

unread,
May 18, 2020, 6:56:11 PM5/18/20
to circuit...@googlegroups.com
Or not properly subclasses the `Event` base class and called the super constructor in a custom `__init__`
(pretty sure this is documented)

Kind regards

--
You received this message because you are subscribed to the Google Groups "circuits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circuits-user...@googlegroups.com.

Mark Scherfling

unread,
May 20, 2020, 10:56:19 AM5/20/20
to circuits
Thank you all for your responses.

The issue appears at scale where the same event is fired overlapping with other events.
Reply all
Reply to author
Forward
0 new messages