Error when using Table exporter

 

I am trying to use Table Exporter to extract fields from the participant dataset. 
I have created a short field list file containing the names of two fields - my actual list is 200 long, but I was trying to make a minimal example to see what is going wrong. 

 

This is how I setup Table Exporter

 

However I get an error “Invalid characters found in field names on line number(s) 1, 2 of the input. ”
 

What I am doing wrong? I took the format of the names from the data dictionary. 

Thank you,

Amy

Comments

4 comments

  • Comment author
    Rachael W The helpers that keep the community running smoothly. UKB Community team Data Analyst
    • Edited

    Hi Amy, I think someone else had this issue and the problem turned out to be the new line characters.

    Different operating systems use different characters to mean “new line”, so if you created your text file in Windows and then tried to use it in Unix it might not recognise the characters correctly.   I think the Table Exporter is built in Unix.

    This website explains the concept pretty well, https://www.baeldung.com/linux/line-breaks-

    types#:~:text=Carriage%20Return%20and%20Line%20Feed%20(CRLF)%20Line%

    20Break&text=Further%2C%20a%20carriage%20return%20character,in%20a%20text%20data%20stream. 

    You could try using dos2unix on your file, either before you upload it to the RAP or from a jupyterlab $_ terminal.

    Alternatively, you could try creating your file in a Unix system.

    2
  • Comment author
    Amy Marie Mason

    Ah! That makes complete sense  - I've had similar issues with Unix systems before, I just hadn't made the leap that these programs were running on Unix. I will try this!
    Thank you. 
    Amy

    0
  • Comment author
    Yue Li

    Hi,I wonder if there is a way to simply change my new line characters in Windows?

    0
  • Comment author
    Amy Marie Mason

    I use MobaTextEditor to do this because it has really straightforward buttons :

    Penguin = unix line ends, windows logo = windows ones. 
    You just open your document in it, click the right button and save it again. 

    If you are already in a unix enviroment, the command dos2unix is even faster: https://dos2unix.sourceforge.io/ 

    5

Please sign in to leave a comment.