hidaris / thingtalk

WebThings framework.
Mozilla Public License 2.0
21 stars 4 forks source link

cannot import name 'cached_property' from 'functools' #9

Closed flatsiedatsie closed 3 years ago

flatsiedatsie commented 3 years ago

I can't seem to import the library succesfully under python 3.7

pi@gateway:~ $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import thingtalk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/.local/lib/python3.7/site-packages/thingtalk/__init__.py", line 4, in <module>
    from .models.action import Action
  File "/home/pi/.local/lib/python3.7/site-packages/thingtalk/models/action.py", line 3, in <module>
    from functools import cached_property
ImportError: cannot import name 'cached_property' from 'functools' (/usr/lib/python3.7/functools.py)
>>> 
hidaris commented 3 years ago

@flatsiedatsie My bad, cached_property was only introduced from python 3.8.

flatsiedatsie commented 3 years ago

No worries. The Raspberry Pi image is still at version 3.7.

hidaris commented 3 years ago

Already fixed.