xcaeag / MenuFromProject-Qgis-Plugin

Build layers shortcuts menus based on QGis projects
8 stars 8 forks source link

v1.2.0-beta1 - Error with lru_cache #38

Closed Guts closed 3 years ago

Guts commented 3 years ago

Puis une autre sur le décorateur lru_cache ?? (Python 3.7) en précisant un maxsize, ça passe.

File "\NAS01\appdata2008\culos\AppData\Roaming.qgisltr\profiles\xcu/python/plugins\menu_from_project\logic\qgs_manager.py", line 148, in def read_from_http(uri: str, cache_folder: Path): File "W:\OSGEO4~1\apps\Python37\lib\functools.py", line 474, in lru_cache raise TypeError('Expected maxsize to be an integer or None') TypeError: Expected maxsize to be an integer or None

Guts commented 3 years ago

Celui-ci est un peu plus charnu : ça marche sans problème sur ma machine :tm:

Le décorateur ne devrait pas avoir besoin des parenthèses :

bref, jemets des parenthèses et on en parle plus !

Guts commented 3 years ago

En fait, il faut bien spécifier un entier pour les versions de Python < 3.8 https://stackoverflow.com/a/59217333/2556577