-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int' #3498
Comments
Which sensors are you running there? |
Need some more info on what sensors/config you're running there. Can re-open if we have that info |
Hi, I am also getting same error:- 2018-05-15 21:21:58,247 ERROR [-] Exception in thread Thread-18: 2018-05-15 21:21:58,248 ERROR [-] -: While trying to execute for following block of code in sensor:- for item in account.inbox.filter(is_read=False): This code is working as expected in Python But Throwing error mentioned above while executing it via sensor @tonybaloney Did you find any resolution ? |
Which sensor? |
Sensor to monitor mailbox.That uses exhangelib module of python. |
Is this your own custom code? Please post a link to the code |
Please find link for code. https://github.com/guptasakshi01/St2/blob/master/monitor_mailbox.py I am facing issue on line number 87. Where We are iterating over all the unread mails containing subject as Test |
@guptasakshi01 It looks like some issue related to threading interaction with eventlet monkey patch. I would try replacing: eventlet.monkey_patch(
os=True,
select=True,
socket=True,
thread=True,
time=True) with eventlet.monkey_patch(
os=True,
select=True,
socket=True,
thread=False,
time=True) In your sensor code. And if that doesn't work, removing eventlet.monkey_patch line all together. |
You should probably also look at the existing MS Exchange pack https://github.com/StackStorm-Exchange/stackstorm-msexchange/ I believe that has issues in some scenarios, but it would be better to start with that, and fix that, rather than write your own code. Better to leverage other's work, and share your improvements. |
@LindsayHill We are not able to use senders email address in this given sensor, Is there any other way I can use the email address of sender as payload while dispatching trigger? @Kami It didn't work Is there any other solution?? |
It looks like it would be trivial to modify the existing sensor to also return the sender ID. e.g. probably change this line https://github.com/StackStorm-Exchange/stackstorm-msexchange/blob/master/sensors/item_sensor.py#L52 and the item_sensor.yaml. Have you tried doing that, rather than writing a whole new sensor? |
Hi @LindsayHill , 2018-05-22 03:29:09,381 ERROR [-] Exception in thread Thread-18: |
@guptasakshi01 Which StackStorm version are you using? If you didn't upgrade yet, try upgrading to v2.7.2. |
@Kami stackstorm version :- st2 2.7.1 |
@Kami Thanks for your help |
Great - glad to hear that. I will close that issue as resolved in v2.7.2. |
@guptasakshi01 now that we've fixed your problem, can you please submit a PR to the MSExchange pack to add the missing functionality that you needed? This will probably help someone else who needs it |
I see this issue in the st2sensorcontainer log.
The text was updated successfully, but these errors were encountered: