LuckyX182 / Filament_sensor_simplified

OctoPrint Filament sensor simplified plugin repository
Apache License 2.0
29 stars 41 forks source link

Running test says "trigger_mode is not defined" when it is #68

Closed derekantrican closed 1 year ago

derekantrican commented 1 year ago

Possibly related to #66 (default settings not working)

Screenshot:

image

octoprint.log:

2022-12-30 06:01:46,382 - octoprint.server.api - ERROR - Error while executing SimpleApiPlugin filamentsensorsimplified
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/server/api/__init__.py", line 158, in pluginCommand
    response = api_plugin.on_api_command(command, data)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1688, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_filamentsensorsimplified/__init__.py", line 107, in on_api_command
    self._logger.info(f"Perfoming test (mode: {mode}, pin: {selected_pin}, triggered_mode: {trigger_mode}")
NameError: name 'trigger_mode' is not defined

It says "trigger_mode is not defined" but you can see from the screenshot that it is

derekantrican commented 1 year ago

Wait - nvm. This one is my fault (messing around with init.py)