OllisGit / OctoPrint-FilamentManager

OctoPrint plugin to manage your filament inventory
GNU Affero General Public License v3.0
53 stars 24 forks source link

TypeError: 'RMKeyView' object is not subscriptable #126

Open smoluks opened 5 months ago

smoluks commented 5 months ago

Describe the bug Error on selecting spool if no reboot after creating the first spool profile

Steps to reproduce

  1. Install plugin
  2. Create new profile and spool
  3. Select spool in main screen
  4. See error: spoon can't be selected, see logs Not reproduced after reboot

Env: OctoPrint Version 1.10.1 Python 3.11.2

Log file Jun 11 02:25:05 octoprint octoprint[2532]: 2024-06-11 02:25:05,433 - octoprint.plugins.filamentmanager - ERROR - Failed to update selected spool for tool0: 'RMKeyView' object is not subscriptable Jun 11 02:25:05 octoprint octoprint[2532]: 2024-06-11 02:25:05,434 - octoprint.plugins.filamentmanager - ERROR - Failed to update selected spool for tool0: 'RMKeyView' object is not subscriptable Jun 11 02:25:05 octoprint octoprint[2532]: Traceback (most recent call last): Jun 11 02:25:05 octoprint octoprint[2532]: File "/home/octoprint/OctoPrint/venv/lib/python3.11/site-packages/octoprint_filamentmanager/api/init.py", line 368, in update_selection Jun 11 02:25:05 octoprint octoprint[2532]: saved_selection = self.filamentManager.update_selection(identifier, self.client_id, selection) Jun 11 02:25:05 octoprint octoprint[2532]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jun 11 02:25:05 octoprint octoprint[2532]: File "/home/octoprint/OctoPrint/venv/lib/python3.11/site-packages/octoprint_filamentmanager/data/init.py", line 319, in update_selection Jun 11 02:25:05 octoprint octoprint[2532]: return self.get_selection(identifier, client_id) Jun 11 02:25:05 octoprint octoprint[2532]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jun 11 02:25:05 octoprint octoprint[2532]: File "/home/octoprint/OctoPrint/venv/lib/python3.11/site-packages/octoprint_filamentmanager/data/init.py", line 306, in get_selection Jun 11 02:25:05 octoprint octoprint[2532]: return self._build_selection_dict(row, row.keys()) if row is not None else dict(tool=identifier, spool=None) Jun 11 02:25:05 octoprint octoprint[2532]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jun 11 02:25:05 octoprint octoprint[2532]: File "/home/octoprint/OctoPrint/venv/lib/python3.11/site-packages/octoprint_filamentmanager/data/init.py", line 280, in _build_selection_dict Jun 11 02:25:05 octoprint octoprint[2532]: sel[column_names[i]] = value Jun 11 02:25:05 octoprint octoprint[2532]: ~~~~^^^ Jun 11 02:25:05 octoprint octoprint[2532]: TypeError: 'RMKeyView' object is not subscriptable octoprint-systeminfo-20240611023519.zip