diff --git a/octoprint_filamentmanager/data/__init__.py b/octoprint_filamentmanager/data/__init__.py index ea5d2b5..0d2e5ec 100644 --- a/octoprint_filamentmanager/data/__init__.py +++ b/octoprint_filamentmanager/data/__init__.py @@ -232,7 +232,7 @@ def get_all_spools(self): j = self.spools.join(self.profiles, self.spools.c.profile_id == self.profiles.c.id) stmt = select([self.spools, self.profiles]).select_from(j).order_by(self.spools.c.name) result = self.conn.execute(stmt) - return [self._build_spool_dict(row, row.keys()) for row in result.fetchall()] + return [self._build_spool_dict(row, tuple(k for k in row.keys())) for row in result.fetchall()] def get_spools_lastmodified(self): with self.lock, self.conn.begin(): @@ -247,7 +247,7 @@ def get_spool(self, identifier): .where(self.spools.c.id == identifier).order_by(self.spools.c.name) result = self.conn.execute(stmt) row = result.fetchone() - return self._build_spool_dict(row, row.keys()) if row is not None else None + return self._build_spool_dict(row, tuple(k for k in row.keys())) if row is not None else None def create_spool(self, data): with self.lock, self.conn.begin(): diff --git a/setup.py b/setup.py index 1ca7d52..d7524ed 100644 --- a/setup.py +++ b/setup.py @@ -13,8 +13,9 @@ plugin_url = "https://github.com/OllisGit/OctoPrint-FilamentManager" plugin_license = "AGPLv3" plugin_requires = ["backports.csv>=1.0.5,<1.1", + "octoprint>=1.8.6", "uritools>=2.1,<2.2", - "SQLAlchemy>=1.1.15,<1.2"] + "SQLAlchemy>=1.4,<1.5"] plugin_additional_data = [] plugin_additional_packages = [] plugin_ignored_packages = [] @@ -29,6 +30,7 @@ "the same python installation that OctoPrint is installed under?") import sys sys.exit(-1) + setup_parameters = octoprint_setuptools.create_plugin_setup_parameters( identifier=plugin_identifier,