sets icon indicating copy to clipboard operation
sets copied to clipboard

Invalid Syntax Error in disk_cache

Open DushyantaDhyani opened this issue 9 years ago • 1 comments

I installed sets ( python setup.py build ; python setup.py install). I then tried running the tensorflow variable sequence classification script here . I get the following error

line 4, in import sets File "/home/distro/.virtualenvs/hm_bilstm/local/lib/python2.7/site-packages/sets-0.3.2-py2.7.egg/sets/init.py", line 2, in from .core import * File "/home/distro/.virtualenvs/hm_bilstm/local/lib/python2.7/site-packages/sets-0.3.2-py2.7.egg/sets/core/init.py", line 2, in from .step import Step File "/home/distro/.virtualenvs/hm_bilstm/local/lib/python2.7/site-packages/sets-0.3.2-py2.7.egg/sets/core/step.py", line 12 def disk_cache(cls, basename, function, *args, method=True, **kwargs): ^ SyntaxError: invalid syntax

DushyantaDhyani avatar Dec 24 '16 23:12 DushyantaDhyani

I had the same issue and had to swap args and method arguments like this: def disk_cache(cls, basename, function, method=True, *args, **kwargs): Then the problem went away.

roman3017 avatar Dec 31 '17 07:12 roman3017