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

No non-ASCII characters on Windows? (round 2) #37

Open
brisaann opened this issue Apr 21, 2021 · 5 comments
Open

No non-ASCII characters on Windows? (round 2) #37

brisaann opened this issue Apr 21, 2021 · 5 comments

Comments

@brisaann
Copy link

brisaann commented Apr 21, 2021

Revisiting this issue [#36] because I'm having the exact same error as the initial posting on my Windows 10 machine, even with the newest wrassp version (1.0.0).

When using import_mediaFiles to import a list of .wav files, where some .wav files contain non-ASCII characters (i.e. SW_012_201_201_bål_long_0) , wrassp throws the following error....

> import_mediaFiles(dbHandle_swedish, dir = "C:/User/Swedish/012/", verbose = T)
INFO: Importing 240 media files... |======== | 17%Error in wrassp::read.AsspDataObj(newMediaFileFullPath, 0, 4000) :
Can't open file(C:\User\Swedish\swedish_emuDB\012_ses\SW_012_201_201_ba°l_long_0_bndl\SW_012_201_201_ba°l_long_0.wav)

I'm able to import individual .wav files with these characters directly into RStudio on Windows without using wrassp.

@raphywink
Copy link
Contributor

Ok strange. I just retested it on my Windows 10 machine and everything seems to be working correctly. Here is my output of devtools::session_info()

- Session info --------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 4.0.5 (2021-03-31)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United Kingdom.1252 
 ctype    English_United Kingdom.1252 
 tz       Europe/Berlin               
 date     2021-04-21                  

- Packages ------------------------------------------------------------------------------------------------------------
 package     * version date       lib source        
...
 wrassp      * 1.0.0   2021-04-21 [1] local

@brisaann
Copy link
Author

brisaann commented Apr 21, 2021

Hmm, I'm wondering if it's possible that the 'source' is the problem? When I do devtools::session_info() I get 'CRAN' as the wrassp source, instead of 'local'.

- Session info ---------------------------------------------------------------------------------------------------------
setting value
version R version 4.0.5 (2021-03-31)
os Windows 10 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate English_United States.1252
ctype English_United States.1252
tz Pacific/Honolulu
date 2021-04-21

- Packages -------------------------------------------------------------------------------------------------------------
package * version date lib source
...
wrassp * 1.0.0 2021-02-10 [1] CRAN (R 4.0.5)

@raphywink
Copy link
Contributor

source shouldn't be the issue as that just says that I am running the local development version of the package (which should be identical to the current CRAN release as I haven't changed anything). If you can put together a repex I'd gladly test it on my Win10 machine.

@brisaann
Copy link
Author

brisaann commented Apr 27, 2021

Ah, that makes sense. I'm not familiar with repex, but the good news is that after wiping the R session clean and starting from scratch a few times, I'm able to use import_media to load files with such characters (on both MacOS and Windows 10).

Now though, I've run into different problem (using MacOS)- it seems that all the offending characters were converted to a different character in the emuDB. So for the filename SW_012_201_201_bål_long_0, bål becomes bUl. Is there a way to prevent the conversion of these characters?

Furthermore, in EMU-WebApp I am able unable to save files with such converted characters. When attempting to save, I get the pop up Error below. I'm guessing because there is a discrepancy now between the imported .wav filename (containing å) and the .json filename (containing U). It's only these particular files that have trouble saving, all other files save fine from EMU-WebApp.

Communication error with server! Error message is: (converted from warning) cannot open file '/User/Swedish/swedish_emuDB/12_ses/SW_012_201_201_bål_long_0_annot.json': No such file or directory

@raphywink
Copy link
Contributor

By repex I mean reproducable example i.e. could you put together a tiny emuDB for example just containing a single bundle and send me that (via email is fine if you don't want to post it here; see here: https://www.phonetik.uni-muenchen.de/personen/mitarbeiter/winkelmann_raphael/index.html) + the lines of R code that reproduce the issue on that small emuDB. Then I can try to reproduce and debugg the issue on my end

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