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

discord webhook stops working after Python 3 upgrade #128

Open
sysop255 opened this issue Dec 7, 2021 · 2 comments
Open

discord webhook stops working after Python 3 upgrade #128

sysop255 opened this issue Dec 7, 2021 · 2 comments

Comments

@sysop255
Copy link

sysop255 commented Dec 7, 2021

2021-12-06 20:06:10,042 - octoprint.plugins.Octoslack - DEBUG - Event: Connected, NotificationEnabled: True, CommandEnabled: False, OverrideNotificationEnabledCheck: False, LastProcessedKey: Connected, LastProcessedTime: 0, MinNotificationInterval: 0, Payload: {'port': 'VIRTUAL', 'baudrate': 115200}
2021-12-06 20:06:10,043 - octoprint.plugins.Octoslack - DEBUG - Updating Event last processed time: Connected, LastProcessedKey: Connected, NewLastProcessedTime: 1638839170.043059
2021-12-06 20:06:10,046 - octoprint.plugins.Octoslack - DEBUG - Printer data: {'state': {'text': 'Operational', 'flags': {'operational': True, 'printing': False, 'cancelling': False, 'pausing': False, 'resuming': False, 'finishing': False, 'closedOrError': False, 'error': False, 'paused': False, 'ready': True, 'sdReady': True}, 'error': ''}, 'job': {'file': {'name': None, 'path': None, 'display': None, 'origin': None, 'size': None, 'date': None}, 'estimatedPrintTime': None, 'averagePrintTime': None, 'lastPrintTime': None, 'filament': None, 'user': None}, 'currentZ': None, 'progress': {'completion': None, 'filepos': None, 'printTime': None, 'printTimeLeft': None, 'printTimeLeftOrigin': None}, 'offsets': {}, 'resends': {'count': 0, 'transmitted': 5, 'ratio': 0}}
2021-12-06 20:06:10,122 - octoprint.plugins.Octoslack - ERROR - Error processing event: Connected, Error: 'ValueError' object has no attribute 'message'
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_Octoslack/__init__.py", line 1627, in process_slack_event
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_Octoslack/__init__.py", line 1221, in handle_event
  File "/home/pi/OctoPrint/venv/lib/python3.7/site-packages/octoprint_Octoslack/__init__.py", line 1639, in process_slack_event
2021-12-06 20:06:10,159 - octoprint.plugin - DEBUG - Calling on_event on Octoslack
2021-12-06 20:06:10,412 - octoprint.plugin - DEBUG - Calling on_event on Octoslack
@fraschetti fraschetti added the bug label Nov 18, 2022
@fraschetti
Copy link
Owner

Thanks for reporting this issue. I'll take a look as time permits.

@fraschetti
Copy link
Owner

Hi @sysop255
There were two issues here not specific to Discord

  1. The latest OS images have moved the command we use to fetch the RasPi temp. I've put in a fix for this that will go out in the next release. Under the current version this triggers the exception logging logic for this flow that has a bug under Python3
  2. Python3 has swapped the message attribute on exceptions to just msg. The new code (staged for the next release) will handle this properly but right now it throws another exception that prevents the entire plugin from posting messages.

For now, if you disable the Raspberry Pi temperature, that will work around this issue until the next release goes out.

Thanks for reporting this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants