{"action":"created","issue":{"url":"https://api.github.com/repos/hgascon/pulsar/issues/1","repository_url":"https://api.github.com/repos/hgascon/pulsar","labels_url":"https://api.github.com/repos/hgascon/pulsar/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/hgascon/pulsar/issues/1/comments","events_url":"https://api.github.com/repos/hgascon/pulsar/issues/1/events","html_url":"https://github.com/hgascon/pulsar/issues/1","id":148620042,"number":1,"title":"loadPrismaData Error","user":{"login":"valour01","id":5527468,"avatar_url":"https://avatars.githubusercontent.com/u/5527468?v=3","gravatar_id":"","url":"https://api.github.com/users/valour01","html_url":"https://github.com/valour01","followers_url":"https://api.github.com/users/valour01/followers","following_url":"https://api.github.com/users/valour01/following{/other_user}","gists_url":"https://api.github.com/users/valour01/gists{/gist_id}","starred_url":"https://api.github.com/users/valour01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valour01/subscriptions","organizations_url":"https://api.github.com/users/valour01/orgs","repos_url":"https://api.github.com/users/valour01/repos","events_url":"https://api.github.com/users/valour01/events{/privacy}","received_events_url":"https://api.github.com/users/valour01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-04-15T10:12:57Z","updated_at":"2016-11-10T18:27:55Z","closed_at":null,"body":"I am going to use pulsar to learn a model with pcap file. I have a test.pcap in the dir of pulsar and when I am going to `python pulsar.py -l -p test.pcap`\nThe below exception raised:\n\n> source(\"prisma.R\")\n> source(\"dimensionEstimation.R\")\n> source(\"matrixFactorization.R\") \n> setwd(initial_dir)\n> \n>  load the dataset\n> print(capture_dir)\n> [1] \"/usr/local/src/pulsar/models/test/test\"\n> data = loadPrismaData(capture_dir)\n> Reading data...\n> Splitting ngrams...\n> Calc indices...\n> Setup matrix...\n> to check: 2 \n> Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) : \n>   index larger than maximal 0\n> Calls: loadPrismaData ... callGeneric -> eval -> eval -> [ -> [ -> subCsp_rows -> intI\n> Execution halted\n> Traceback (most recent call last):\n>   File \"pulsar.py\", line 97, in <module>\n>     mg.generate_model()\n>   File \"/usr/local/src/pulsar/pulsar/core/model.py\", line 59, in generate_model\n>     self._generate_model_pcaps()\n>   File \"/usr/local/src/pulsar/pulsar/core/model.py\", line 78, in _generate_model_pcaps\n>     self._build_model_files(pcap_noext)\n>   File \"/usr/local/src/pulsar/pulsar/core/model.py\", line 185, in _build_model_files\n>     urllib.unquote(self.whitespace), self.subrules)\n>   File \"/usr/local/src/pulsar/pulsar/core/model.py\", line 227, in __init__\n>     self.dh = data.DataHandler(datapath, ngram, whitespace)\n>   File \"/usr/local/src/pulsar/pulsar/core/data.py\", line 19, in **init**\n>     self._readClusterAssignments()\n>   File \"/usr/local/src/pulsar/pulsar/core/data.py\", line 35, in _readClusterAssignments\n>     self.N, skipFirstLine=False)\n>   File \"/usr/local/src/pulsar/pulsar/core/data.py\", line 78, in _processData\n>     f = file(fname, \"r\")\n> IOError: [Errno 2] No such file or directory: '/usr/local/src/pulsar/models/test/test.cluster'\n\nI noticed the code crash in `curCor = sparse.cor(mat[toCheck, ])`. I noticed that you are also the author of PRISMA. I am wondering whether this problem is related to my pcap file or if you need more information. Many Thanks. And it would also be great if you can share your test data\n"},"comment":{"url":"https://api.github.com/repos/hgascon/pulsar/issues/comments/259768157","html_url":"https://github.com/hgascon/pulsar/issues/1#issuecomment-259768157","issue_url":"https://api.github.com/repos/hgascon/pulsar/issues/1","id":259768157,"user":{"login":"leesangmin144","id":12684950,"avatar_url":"https://avatars.githubusercontent.com/u/12684950?v=3","gravatar_id":"","url":"https://api.github.com/users/leesangmin144","html_url":"https://github.com/leesangmin144","followers_url":"https://api.github.com/users/leesangmin144/followers","following_url":"https://api.github.com/users/leesangmin144/following{/other_user}","gists_url":"https://api.github.com/users/leesangmin144/gists{/gist_id}","starred_url":"https://api.github.com/users/leesangmin144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leesangmin144/subscriptions","organizations_url":"https://api.github.com/users/leesangmin144/orgs","repos_url":"https://api.github.com/users/leesangmin144/repos","events_url":"https://api.github.com/users/leesangmin144/events{/privacy}","received_events_url":"https://api.github.com/users/leesangmin144/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T18:27:55Z","updated_at":"2016-11-10T18:27:55Z","body":"Hi hgascon! I have a similar Exception too. \r\npcap file was made up only HTTP protocol (simple Request, Response) and i executed \"# python pulsar.py -l -p test.pcap\". used pcap file is [this](https://github.com/leesangmin144/pulsar/blob/master/test.pcap) As results, generated 8 files(test.drk  test.fdrk  test.fsally  test.harry  test.pcap  test.raw  test.rawquoted  test.sally) in \"/home/pulsar/models/test\" folder.\r\nThe below Exception raised:\r\n--------------------------------------------------------------------------------------------\r\n> source(\"prisma.R\")\r\n> source(\"dimensionEstimation.R\")\r\n> source(\"matrixFactorization.R\") \r\n> setwd(initial_dir)\r\n> \r\n> # load the dataset\r\n> data = loadPrismaData(capture_dir)\r\nReading data...\r\nSplitting ngrams...\r\nCalc indices...\r\nSetup matrix...\r\nError in rep(1:N, sapply(ngrams[-total], length)) : \r\n  invalid 'times' argument\r\nCalls: loadPrismaData -> readPrismaInput -> readFSally -> sparseMatrix\r\nExecution halted\r\nError during clustering (not enough data?)\r\nCluster file not generated: /home/pulsar/models/test/test.cluster\r\nExiting learning module...\r\n--------------------------------------------------------------------------------------------\r\n\r\nI would appreciate your attention."}}
{"actor":{"display_login":"leesangmin144"}}