Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list of sequences | not working #6

Open
ZiyadMoraished opened this issue Dec 20, 2019 · 1 comment
Open

list of sequences | not working #6

ZiyadMoraished opened this issue Dec 20, 2019 · 1 comment

Comments

@ZiyadMoraished
Copy link

Hi There!

I'm trying to load the data as list of sequences as show below

from pycspade.helpers import spade, print_result
spade([[1, 1,[ 2]],
       [1, 2, [1]],
       [2, 1, [2]]])

I get the following error

TypeError Traceback (most recent call last)
in ()
1 spade([[1, 1,[ 2]],
2 [1, 2, [1]],
----> 3 [2, 1, [2]]])

~\AppData\Local\Continuum\anaconda3\lib\site-packages\pycspade\helpers.py in spade(filename, data, support, maxsize, maxlen, mingap, maxgap, memsize, numpart, maxwin, bfstype, tid_lists, parse)
123 raise Exception('You must provide either filename or data')
124
--> 125 if filename and not os.path.isfile(filename):
126 raise Exception('File {} does not exist'.format(filename))
127

~\AppData\Local\Continuum\anaconda3\lib\genericpath.py in isfile(path)
28 """Test whether a path is a regular file"""
29 try:
---> 30 st = os.stat(path)
31 except OSError:
32 return False

TypeError: stat: path should be string, bytes, os.PathLike or integer, not list

I'm using :

  1. python 3.6.4
  2. windows 10
  3. running on Jupyter noetbook
@valtheval
Copy link

Hello,
first argument of spade() is filename so it expects a string.
Use

spade(data=[[1, 1,[ 2]],
       [1, 2, [1]],
       [2, 1, [2]]])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants