IPS-LMU / emuR

The main R package for the EMU Speech Database Management System (EMU-SDMS)
http://ips-lmu.github.io/EMU.html
23 stars 15 forks source link

Error in sqliteSendQuery(con, statement, bind.data) : error in statement: no such function: list #121

Closed benvolchok closed 7 years ago

benvolchok commented 8 years ago

Hi there,

I'm a research assistant from The University of Melbourne working in the phonetics lab. I've encountered the above issue when trying to load an emuR database. There were no errors in the TextGrid conversion stage. I'm running on Windows 7 with R-3.3.1 and emuR package 0.1.9.9005.

Just wondering if there's any suggestions you have about this issue.

Thanks!

Ben

EDIT: Just tried loading an old database, which worked fine, so I'm thinking this is an issue with the TextGrid conversion process. Would anyone be able to help with this?

raphywink commented 8 years ago

Hey,

hmmm... that sounds strange. You could try deleting the _emuDBcache.sqlite file and then reloading the emuDB (which recreates it). But just going by the error message I don't think the cache should be the problem. If you want me to take a closer look at it you'll have to send me a small subset of the TextGrid collection (single .wav & .TextGrid pair that post conversion causes the problem). Feel free to send it to my phonetik.uni-muenchen.de email if you don't want to post it here. Could be that you found a bug in the convert_TextGridCollection() function....

Question: is there a reason you are using the dev version of emuR? Because I am currently rewriting a large portion of the query engine and I can't promise that the dev version is always stable.

Greetings from Munich

benvolchok commented 8 years ago

Hi,

I tried deleting the sqlite file but that didn't help, it just gave the same error message.

I've uploaded here a pair from a database that had previously converted properly - in fact loading the previously converted one works fine. To clarify: there was a database that a few months ago I'd converted and am still able to load, but now converting the same .wav/.TextGrid files doesn't work. I also had a look at the .json files from the latest attempt at conversion and they are essentially blank.

Regarding the version of emuR, I was using 0.1.9 but when I encountered the error I thought I'd try updating it to the latest dev version.

Thanks,

Ben WN20_M_hal.zip

raphywink commented 8 years ago

I just tried the following with the WN20_M_hal.zip pair:

install_github("IPS-LMU/emuR") # using the current dev version
convert_TextGridCollection("~/Desktop/WN20_M_hal", dbName = "ben", "~/Desktop/")
ben = load_emuDB("~/Desktop/ben_emuDB")
summary(ben)
serve(ben)

on my Mac (OSX 10.11.6), on an IPS Ubuntu installation and on my Windows 10 virtual box install and didn't run into any problems. You will either have to send me the entire TextGridCollection or search for a file pair that fails to convert. Otherwise I won't be able to diagnose/debug the problem... sorry about the extra hassle...

@emuR version: ok... that's fine. I just have had a few other users that run install_github() every time they open up their script and some of them where wondering why things kept changing :-) and I told them to try to stick to the stable CRAN release if possible...

benvolchok commented 8 years ago

The issue was that all of the pairs failed to convert, including the one I sent you. I'm attaching the resulting bundle from the pair I sent you the way it appears on my computer.

Another potential issue is that the database folder produced by the process was named "_ses" rather than the expected "0000_ses"; not sure if that means anything. WN20_M_hal_bndl.zip

raphywink commented 8 years ago

When using a current version of emuR does the "WN20_M_hal.zip" TextGridCollection still not convert properly with you? Because if I can't reproduce the bug it is a bit difficult for me/us to fix it.

benvolchok commented 8 years ago

I have the latest version of emuR and Rstudio.

I even tried converting just that one file (WN20_M_hal) and it does the same thing. The json file is coming up blank:

{ "name": "WN20_M_hal", "annotates": "WN20_M_hal.wav", "sampleRate": [], "levels": [ { "items": [], "name": "Phoneme", "type": "SEGMENT" } ], "links": [] }

It seems like it has something to do with the TextGridConversion but I'm not sure what since you're not coming up with any issues when you do it...

raphywink commented 8 years ago

This is super weird:

Step 1.) download the above .zip file and unzip

Step 2.)

convert_TextGridCollection("~/Desktop/WN20_M_hal/", dbName = "testBen", targetDir = "~/Desktop/")
testBen = load_emuDB("~/Desktop/testBen_emuDB/")
serve(testBen)

looks perfect in the EMU-webApp and the content of /testBen_emuDB/0000_ses/WN20_M_hal_bndl/WN20_M_hal_annot.json also looks fine:

{
  "name": "WN20_M_hal",
  "annotates": "WN20_M_hal.wav",
  "sampleRate": 44100,
  "levels": [
    {
      "items": [
        {
          "id": 1,
          "sampleStart": 0,
          "sampleDur": 15396,
          "labels": [
            {
              "name": "Phoneme",
              "value": " "
            }
          ]
        },
        {
          "id": 2,
          "sampleStart": 15397,
          "sampleDur": 3067,
          "labels": [
            {
              "name": "Phoneme",
              "value": "h"
            }
          ]
        },

I once again tried it on 3 different operating systems...

What are the exact commands you are using? Could you maybe also paste the output of devtools::session_info() here?

raphywink commented 8 years ago

Here is a screenshot of the EMU-webApp displaying the converted emuDB:

screen shot 2016-10-10 at 14 51 03

benvolchok commented 7 years ago

Hi Raphael,

Sorry for the long gap in communication, I was working on some other projects.

I've just had a complete upgrade of my computer today and reinstalled everything from scratch, and, once again, I ran into this issue.

However - I was just about to type a full response with the commands I was using, etc. and while I was testing it out again one final time to fully make sure, it suddenly worked! So I tried to dig deeper to figure out what was happening, and basically the problem was to do with the type of file path I was using in R: previously, when the conversion process was working, I had been using files directly from my computer, but when our university servers upgraded my files were all moved to the university server rather than being housed on my local drive. And so when I altered the commands to include the new paths to the server, I was using file paths that included direct links to the server (e.g. "//uom-file.unimelb.edu.au/119/Users/..."). But just now as I was fiddling with the test zip that I sent, I noticed that this server still had its own drive name, and so I retried the commands using a file path that used a local drive name instead of calling up the server, and it all worked fine! I'm still not exactly why using the server path would have thrown off the TextGrid conversion process given it recognised the directory and found all the files (there's probably a really easy answer that I have no idea about), but this seems to have solved the problem...!

I'm not sure if anyone else would ever have this kind of issue but I thought I'd let you know in any case - at the very least for closure's sake.

Thanks for all your help over these past months!

Ben

raphywink commented 7 years ago

Hi Ben,

thanks for the heads up about the file paths. Our current TextGrid parser simply uses readChar() to slurp in the text file file:

https://github.com/IPS-LMU/emuR/blob/master/R/emuR-parse_TextGridDBI.R#L323

and we pre-check the dir argument like this:

https://github.com/IPS-LMU/emuR/blob/master/R/emuR-convert_TextGridCollection.R#L59

does reading your files using the server paths work directly in R with read.table() or readChar()?

One more question (so we can potentially test the problem our selves): Are your files hosted on a SAMBA server or do you have a different system running at your uni?

benvolchok commented 7 years ago

Hi Raphael,

Here's what happens when I used readChar() on one of the TextGrids that I copied into a folder on the desktop. As you can see it seems to read it fine:

> readChar("//uom-file.unimelb.edu.au/119/Users/volchokb/Desktop/mono/AW01_F_hack.TextGrid", 1000)
[1] "File type = \"ooTextFile\"\r\nObject class = \"TextGrid\"\r\n\r\nxmin = 0 \r\nxmax = 3.984092441681355 \r\ntiers? <exists> \r\nsize = 1 \r\nitem []: \r\n    item [1]:\r\n        class = \"IntervalTier\" \r\n        name = \"Phoneme\" \r\n        xmin = 0 \r\n        xmax = 3.984092441681355 \r\n        intervals: size = 25 \r\n        intervals [1]:\r\n            xmin = 0 \r\n            xmax = 0.417779499193216 \r\n            text = \"\" \r\n        intervals [2]:\r\n            xmin = 0.417779499193216 \r\n            xmax = 0.5577794991932308 \r\n            text = \"h\" \r\n        intervals [3]:\r\n            xmin = 0.5577794991932308 \r\n            xmax = 0.7377794991932092 \r\n            text = \"A\" \r\n        intervals [4]:\r\n            xmin = 0.7377794991932092 \r\n            xmax = 0.7877794991932205 \r\n            text = \"k\" \r\n        intervals [5]:\r\n            xmin = 0.7877794991932205 \r\n            xmax = 1.0377794991932205 \r\n            text = \... <truncated>

I'm not entirely sure what kind of server our uni uses unfortunately so I can't help you there, but I can try finding out if you like?

raphywink commented 7 years ago

That is strange. It seems that R can open the connection to the TextGrid file... hmmm... I have no idea what could be causing the issue...

benvolchok commented 7 years ago

It is very weird! It would be interesting to figure out why it wasn't working with the server path but I guess the problem is solved now...

raphywink commented 7 years ago

I'll close the issue for now... if it happens again just reopen it...