agrif / OctoPrint-InfluxDB

Writes temperatures and events to an Influx database.
GNU Affero General Public License v3.0
24 stars 15 forks source link

filament has no items #6

Closed blalor closed 4 years ago

blalor commented 4 years ago

Seeing this in the octoprint log:

2020-03-22 15:17:01,182 - octoprint.plugin - ERROR - Error while calling plugin influxdb
Traceback (most recent call last):
  File "/opt/octoprint-venv/lib/python3.8/site-packages/OctoPrint-1.4.0-py3.8.egg/octoprint/plugin/__init__.py", line 224, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/opt/octoprint-venv/lib/python3.8/site-packages/octoprint_influxdb/__init__.py", line 229, in on_event
    for filname, filval in job.get('filament', {}).items():
AttributeError: 'NoneType' object has no attribute 'items'
2020-03-22 15:17:01,426 - octoprint.plugin - ERROR - Error while calling plugin influxdb
Traceback (most recent call last):
  File "/opt/octoprint-venv/lib/python3.8/site-packages/OctoPrint-1.4.0-py3.8.egg/octoprint/plugin/__init__.py", line 224, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/opt/octoprint-venv/lib/python3.8/site-packages/octoprint_influxdb/__init__.py", line 229, in on_event
    for filname, filval in job.get('filament', {}).items():
AttributeError: 'NoneType' object has no attribute 'items'

Octoprint 1.4.0, influxdb plugin 1.2.0

agrif commented 4 years ago

Ah, looks like maybe 1.4.0 changed something. This shouldn't be too hard to fix -- I'll try to check it out tonight.

agrif commented 4 years ago

I've just tagged and released 1.2.1. It should show up in the plugin updater automatically. Give it a whirl, and feel free to re-open this issue if this doesn't fix it. Thanks for the report!

blalor commented 4 years ago

Looks good! Thanks!

-- Brian Lalor (he/him) blalor@bravo5.org

On Mar 24, 2020, at 6:56 PM, Aaron Griffith notifications@github.com wrote:

 Closed #6.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.