View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
15001Bug reportsImport/Exportpublic2020-03-02 16:57
Reporterstvm_36 Assigned Toc_schmitz  
PriorityhighSeveritycrash 
Status closedResolutionfixed 
Product Version3.17.x 
Fixed in Version3.19.2 
Summary15001: Values Labels for single-answer questions
Description

SPSS Syntax does not load the Values Labels for single-answer questions.

TagsNo tags attached.
Attached Files
Bug heat14
Complete LimeSurvey version number (& build)Versão 3.17.6+190624
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & version5.5.59-MariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version4.7.7

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2019-06-25 09:02

updater   ~52522

Last edited: 2019-06-25 09:02

@cdorin, this is another bug report by one of our customers. Have there been any adjustments to the SPSS export recently?

cdorin

cdorin

2019-06-25 11:17

reporter   ~52528

I am gonna tag @f_funke since he knows better the SPSS-related issues

f_funke

f_funke

2019-06-25 13:49

developer   ~52542

I cannot replicate the issue.
Just did a survey with a list (radio) question and found value labels in SPSS syntax as expected.
@Mazi: Did you check? Could you provide more information?

stvm_36

stvm_36

2019-06-25 15:50

reporter   ~52546

The problem occurs with the version of LimeSurvey version 3.17.5 + 190604 e 190624

f_funke

f_funke

2019-06-25 16:14

developer   ~52548

I also tested on 3.17.5.
Could you please upload the survey and the SPSS syntax, @stvm_36, and let me know, which variable is affected?

jelo

jelo

2019-06-25 17:20

partner   ~52550

What SPSS versions are used?
I see "Versão" in the bugticket. So perhaps an issue with UTF8 mode in SPSS.

stvm_36

stvm_36

2019-06-25 18:22

reporter   ~52553

The problem is the UTF 8 comm.
If you save the SYNATX with local encoding it loads values labels.
I tested it now.

stvm_36

stvm_36

2019-06-25 18:29

reporter   ~52554

IBM SPSS 25

stvm_36

stvm_36

2019-06-25 18:34

reporter   ~52555

IBM 25
Variables
p1
p2
p3
p4
q0

survey_63237_SPSS_syntax_file.sps (6,116 bytes)   
* Encoding: UTF-8.
*$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
 /TYPE=TXT
 /FILE='C:\Users\sthvm\Desktop\AV_3\survey_63237_SPSS_data_file.dat'
 /DELCASE=LINE
 /DELIMITERS=","
 /QUALIFIER="'"
 /ARRANGEMENT=DELIMITED
 /FIRSTCASE=1
 /IMPORTCASE=ALL
 /VARIABLES=
 V1 A100
 V2 A100
 V3 A100
 V4 A100
 V5 A100
 V6 A100
 V7 A100
 V8 A100
 V9 A100
 V10 A100
 V11 A100
 V12 F7
 V13 DATETIME23.2
 V14 F7
 V15 A20
 V16 A31
 V17 A5
 V18 DATETIME23.2
 V19 DATETIME23.2
 V20 F1
 V21 F1
 V22 F1
 V23 F1
 V24 F1
 V25 F1
 V26 F1
 V27 F1
 V28 F1
 V29 F1
 V30 F1
 V31 F1
 V32 F1
 V33 F1
 V34 F1
 V35 F1
 V36 F1
 V37 F1
 V38 F1
 V39 F1
 V40 F1
 V41 F1.
CACHE.
EXECUTE.
*Define Variable Properties.
VARIABLE LABELS V1 "Nome".
VARIABLE LABELS V2 "Sobrenome".
VARIABLE LABELS V3 "E-mail".
VARIABLE LABELS V4 "Status do e-mail".
VARIABLE LABELS V5 "Código de língua".
VARIABLE LABELS V6 "Data de envio do convite".
VARIABLE LABELS V7 "Data de envio do último lembrete".
VARIABLE LABELS V8 "Número total de lembretes enviados".
VARIABLE LABELS V9 "Usos restantes".
VARIABLE LABELS V10 "Idade".
VARIABLE LABELS V11 "Sexo".
VARIABLE LABELS V12 "id".
VARIABLE LABELS V13 "submitdate".
VARIABLE LABELS V14 "lastpage".
VARIABLE LABELS V15 "startlanguage".
VARIABLE LABELS V16 "Semente".
VARIABLE LABELS V17 "token".
VARIABLE LABELS V18 "startdate".
VARIABLE LABELS V19 "datestamp".
VARIABLE LABELS V20 "Sexo".
VARIABLE LABELS V21 "Idade".
VARIABLE LABELS V22 "Escolaridade".
VARIABLE LABELS V23 "Faixa de Renda".
VARIABLE LABELS V24 "Unidade onde trabalha".
VARIABLE LABELS V25 "[Antes de jogar algo no lixo, você pensa em como poderia reutilizá-lo?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V26 "[Você separa o lixo que pode ser reciclado, como papel, plástico, alumínio, vidro ou metais ferrosos?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V27 "[Você evita a queima de lixo doméstico (plásticos, isopor, restos orgânicos)?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V28 "[Você procura não deixar a torneira aberta ao escovar os dentes ou fazer a barba?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V29 "[Você apaga as luzes e a TV quando sai do ambiente?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V30 "[Você se preocupa em não jogar lixo na rua?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V31 "[Você utiliza os dois lados dos papéis, ou reutiliza rascunhos?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V32 "[Ao comprar, você tem a prática de procurar saber se o fabricante tem ações ambientais (leva em conta a postura ambiental do fabricante antes de comprar)?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V33 "[Você tem a prática de comprar produtos e embalagens fabricados com material reciclado ou que podem ser recicláveis?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V34 "[Antes da compra, você tem a prática de verificar rótulos e embalagens para identificar um produto ambientalmente correto?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V35 "[Você tem a prática de comprar produtos orgânicos?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V36 "[Você tem a prática de comprar produtos de limpeza biodegradáveis?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V37 "[Você tem a prática de comprar lâmpadas e eletrodomésticos que gastam menos energia?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V38 "[Você tem a prática de pagar mais por um produto que não polui o meio ambiente?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V39 "[Nas compras, ao encontrar um produto com rótulo que informa que ele foi fabricado de maneira ambientalmente correta, você fica motivado em comprá-lo?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V40 "[Você concorda que uma empresa é ecologicamente correta por fazer reflorestamento?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V41 "[Você concorda que o fato de uma empresa praticar o reflorestamento lhe influência a comprar seus produtos?] Por favor, responda as perguntas que se seguem:".
*Define Value labels.
VARIABLE LEVEL V21(ORDINAL).
VARIABLE LEVEL V22(ORDINAL).
VARIABLE LEVEL V23(ORDINAL).
VARIABLE LEVEL V24(ORDINAL).
RENAME VARIABLE ( V1 = firstname ).
RENAME VARIABLE ( V2 = lastname ).
RENAME VARIABLE ( V3 = email ).
RENAME VARIABLE ( V4 = emailstatus ).
RENAME VARIABLE ( V5 = language ).
RENAME VARIABLE ( V6 = sent ).
RENAME VARIABLE ( V7 = remindersent ).
RENAME VARIABLE ( V8 = remindercount ).
RENAME VARIABLE ( V9 = usesleft ).
RENAME VARIABLE ( V10 = attribute_1 ).
RENAME VARIABLE ( V11 = attribute_2 ).
RENAME VARIABLE ( V12 = id ).
RENAME VARIABLE ( V13 = submitdate ).
RENAME VARIABLE ( V14 = lastpage ).
RENAME VARIABLE ( V15 = startlanguage ).
* Variable name was incorrect and was changed from  to q_ .
RENAME VARIABLE ( V16 = q_ ).
RENAME VARIABLE ( V17 = token ).
RENAME VARIABLE ( V18 = startdate ).
RENAME VARIABLE ( V19 = datestamp ).
RENAME VARIABLE ( V20 = p1 ).
RENAME VARIABLE ( V21 = p2 ).
RENAME VARIABLE ( V22 = p3 ).
RENAME VARIABLE ( V23 = p4 ).
RENAME VARIABLE ( V24 = q0 ).
RENAME VARIABLE ( V25 = q1_1 ).
RENAME VARIABLE ( V26 = q1_2 ).
RENAME VARIABLE ( V27 = q1_3 ).
RENAME VARIABLE ( V28 = q1_4 ).
RENAME VARIABLE ( V29 = q1_5 ).
RENAME VARIABLE ( V30 = q1_6 ).
RENAME VARIABLE ( V31 = q1_7 ).
RENAME VARIABLE ( V32 = q1_8 ).
RENAME VARIABLE ( V33 = q1_9 ).
RENAME VARIABLE ( V34 = q1_10 ).
RENAME VARIABLE ( V35 = q1_11 ).
RENAME VARIABLE ( V36 = q1_12 ).
RENAME VARIABLE ( V37 = q1_13 ).
RENAME VARIABLE ( V38 = q1_14 ).
RENAME VARIABLE ( V39 = q1_15 ).
RENAME VARIABLE ( V40 = q2_1 ).
RENAME VARIABLE ( V41 = q2_2 ).
RESTORE LOCALE.
f_funke

f_funke

2019-06-26 08:29

developer   ~52557

You can also set a different encoding in the general SPSS settings (as long as no data set is open). So you could change it to unicode (UTF-8), import the data, save and close the dataset, and re-set it to your local encoding.

Thanks for the syntax file. Could you also send the survey file (LSS), at least for the questions p1 to q0?

jelo

jelo

2019-06-26 08:47

partner   ~52558

The datafile contains personal data (email adresses). Set the ticket to private or redact the personal data.

f_funke

f_funke

2019-06-26 08:50

developer   ~52559

Thanks for having an eye on that, @jelo! I just deleted the data set.

stvm_36

stvm_36

2019-06-26 11:49

reporter   ~52561

This problem is in all versions of IBM SPSS.
I've already modified it to UTF 8.
Giving trouble again.

survey_63237_SPSS_syntax_file-2.sps (5,920 bytes)   
*$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
 /TYPE=TXT
 /FILE='survey_63237_SPSS_data_file.dat'
 /DELCASE=LINE
 /DELIMITERS=","
 /QUALIFIER="'"
 /ARRANGEMENT=DELIMITED
 /FIRSTCASE=1
 /IMPORTCASE=ALL
 /VARIABLES=
 V1 A100
 V2 A100
 V3 A100
 V4 A100
 V5 A100
 V6 A100
 V7 A100
 V8 A100
 V9 A100
 V10 A100
 V11 A100
 V12 F7
 V13 DATETIME23.2
 V14 F7
 V15 A20
 V16 A31
 V17 A5
 V18 DATETIME23.2
 V19 DATETIME23.2
 V20 F1
 V21 F1
 V22 F1
 V23 F1
 V24 F1
 V25 F1
 V26 F1
 V27 F1
 V28 F1
 V29 F1
 V30 F1
 V31 F1
 V32 F1
 V33 F1
 V34 F1
 V35 F1
 V36 F1
 V37 F1
 V38 F1
 V39 F1
 V40 F1
 V41 F1.
CACHE.
EXECUTE.
*Define Variable Properties.
VARIABLE LABELS V1 "Nome".
VARIABLE LABELS V2 "Sobrenome".
VARIABLE LABELS V3 "E-mail".
VARIABLE LABELS V4 "Status do e-mail".
VARIABLE LABELS V5 "Código de língua".
VARIABLE LABELS V6 "Data de envio do convite".
VARIABLE LABELS V7 "Data de envio do último lembrete".
VARIABLE LABELS V8 "Número total de lembretes enviados".
VARIABLE LABELS V9 "Usos restantes".
VARIABLE LABELS V10 "Idade".
VARIABLE LABELS V11 "Sexo".
VARIABLE LABELS V12 "id".
VARIABLE LABELS V13 "submitdate".
VARIABLE LABELS V14 "lastpage".
VARIABLE LABELS V15 "startlanguage".
VARIABLE LABELS V16 "Semente".
VARIABLE LABELS V17 "token".
VARIABLE LABELS V18 "startdate".
VARIABLE LABELS V19 "datestamp".
VARIABLE LABELS V20 "Sexo".
VARIABLE LABELS V21 "Idade".
VARIABLE LABELS V22 "Escolaridade".
VARIABLE LABELS V23 "Faixa de Renda".
VARIABLE LABELS V24 "Unidade onde trabalha".
VARIABLE LABELS V25 "[Antes de jogar algo no lixo, você pensa em como poderia reutilizá-lo?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V26 "[Você separa o lixo que pode ser reciclado, como papel, plástico, alumínio, vidro ou metais ferrosos?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V27 "[Você evita a queima de lixo doméstico (plásticos, isopor, restos orgânicos)?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V28 "[Você procura não deixar a torneira aberta ao escovar os dentes ou fazer a barba?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V29 "[Você apaga as luzes e a TV quando sai do ambiente?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V30 "[Você se preocupa em não jogar lixo na rua?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V31 "[Você utiliza os dois lados dos papéis, ou reutiliza rascunhos?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V32 "[Ao comprar, você tem a prática de procurar saber se o fabricante tem ações ambientais (leva em conta a postura ambiental do fabricante antes de comprar)?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V33 "[Você tem a prática de comprar produtos e embalagens fabricados com material reciclado ou que podem ser recicláveis?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V34 "[Antes da compra, você tem a prática de verificar rótulos e embalagens para identificar um produto ambientalmente correto?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V35 "[Você tem a prática de comprar produtos orgânicos?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V36 "[Você tem a prática de comprar produtos de limpeza biodegradáveis?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V37 "[Você tem a prática de comprar lâmpadas e eletrodomésticos que gastam menos energia?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V38 "[Você tem a prática de pagar mais por um produto que não polui o meio ambiente?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V39 "[Nas compras, ao encontrar um produto com rótulo que informa que ele foi fabricado de maneira ambientalmente correta, você fica motivado em comprá-lo?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V40 "[Você concorda que uma empresa é ecologicamente correta por fazer reflorestamento?] Por favor, responda as perguntas que se seguem:".
VARIABLE LABELS V41 "[Você concorda que o fato de uma empresa praticar o reflorestamento lhe influência a comprar seus produtos?] Por favor, responda as perguntas que se seguem:".
*Define Value labels.
VARIABLE LEVEL V21(ORDINAL).
VARIABLE LEVEL V22(ORDINAL).
VARIABLE LEVEL V23(ORDINAL).
VARIABLE LEVEL V24(ORDINAL).
RENAME VARIABLE ( V1 = firstname ).
RENAME VARIABLE ( V2 = lastname ).
RENAME VARIABLE ( V3 = email ).
RENAME VARIABLE ( V4 = emailstatus ).
RENAME VARIABLE ( V5 = language ).
RENAME VARIABLE ( V6 = sent ).
RENAME VARIABLE ( V7 = remindersent ).
RENAME VARIABLE ( V8 = remindercount ).
RENAME VARIABLE ( V9 = usesleft ).
RENAME VARIABLE ( V10 = attribute_1 ).
RENAME VARIABLE ( V11 = attribute_2 ).
RENAME VARIABLE ( V12 = id ).
RENAME VARIABLE ( V13 = submitdate ).
RENAME VARIABLE ( V14 = lastpage ).
RENAME VARIABLE ( V15 = startlanguage ).
* Variable name was incorrect and was changed from  to q_ .
RENAME VARIABLE ( V16 = q_ ).
RENAME VARIABLE ( V17 = token ).
RENAME VARIABLE ( V18 = startdate ).
RENAME VARIABLE ( V19 = datestamp ).
RENAME VARIABLE ( V20 = p1 ).
RENAME VARIABLE ( V21 = p2 ).
RENAME VARIABLE ( V22 = p3 ).
RENAME VARIABLE ( V23 = p4 ).
RENAME VARIABLE ( V24 = q0 ).
RENAME VARIABLE ( V25 = q1_1 ).
RENAME VARIABLE ( V26 = q1_2 ).
RENAME VARIABLE ( V27 = q1_3 ).
RENAME VARIABLE ( V28 = q1_4 ).
RENAME VARIABLE ( V29 = q1_5 ).
RENAME VARIABLE ( V30 = q1_6 ).
RENAME VARIABLE ( V31 = q1_7 ).
RENAME VARIABLE ( V32 = q1_8 ).
RENAME VARIABLE ( V33 = q1_9 ).
RENAME VARIABLE ( V34 = q1_10 ).
RENAME VARIABLE ( V35 = q1_11 ).
RENAME VARIABLE ( V36 = q1_12 ).
RENAME VARIABLE ( V37 = q1_13 ).
RENAME VARIABLE ( V38 = q1_14 ).
RENAME VARIABLE ( V39 = q1_15 ).
RENAME VARIABLE ( V40 = q2_1 ).
RENAME VARIABLE ( V41 = q2_2 ).
RESTORE LOCALE.
f_funke

f_funke

2019-06-26 12:02

developer   ~52562

@stvm_36: Please do not post personal data here as this could be a serious violation of data privacy and data protection laws. I deleted "survey_63237_SPSS_data_file.dat" again.

To help you solve your problem, it would be good if you sent your survey (not the dataset). So go to your survey and choose in the top menu on the left hand side "Display/export", select in the pop-up window "survey structure (.lss)" and choose "export". Upload the file here.

jelo

jelo

2019-06-26 12:06

partner   ~52563

It's still no clear what the issue actual is. Only the logfile in SPSS can tell us what is causing the import to be incomplete.

The syntax file generated by LimeSurvey contains the instruction for SPSS to switch to UTF Mode.
It's direct at the beginning of the file. SET UNICODE=ON.

I wonder why I read SET LOCALE='en_UK' when you capture data in Brazilian Portuguese. Did you use the en_UK survey language in LimeSurvey?

BTW: You environment information e.g. PHP Version 4.7.7 seem to be wrong.

stvm_36

stvm_36

2019-06-26 15:56

reporter   ~52567

I have the version of LimeSurvey version 3.17.3 + 190429 installed have too in gold domain
The version 3.17.3 + 190429 is correct.
After upgrading to version 3.17.6 + 190624 gives problem in Syntax.
SET LOCALE = ' en_UK ' is automatically generated by LimeSurvey. Not to change.
Test with pHPP 5.5, 5.6 and 7.0 and gave the same problem.

stvm_36

stvm_36

2019-06-26 16:09

reporter   ~52568

The version 3.17.6 + 190624 does not generate the correct SyntaxALUES LABELS that is the real problem.

Already in version 3.17.3 + 190429 It correctly generates THE VALUES LABELS.

stvm_36

stvm_36

2019-06-26 16:10

reporter   ~52569

The version 3.17.6 + 190624 does not generate the correct Syntax VALUES LABELS that is the real problem.

Already in version 3.17.3 + 190429 It correctly generates THE VALUES LABELS.

jelo

jelo

2019-06-26 16:35

partner   ~52570

stvm_36: You state that you're running PHP 4.7.7 in this ticket. That the PHP version isn't the main driver for the issue is clear to me.
Depending on the accuracy of information provided in this ticket, you will understand that I will have to question things.

You state: "The version 3.17.6 + 190624 does not generate the correct Syntax VALUES LABELS that is the real problem."
When the syntax is not correct, SPSS states an error message for every wrong syntax line. What is the error?

In https://bugs.limesurvey.org/view.php?id=15001#c52553 you state:
The problem is the UTF 8 comm.
If you save the SYNATX with local encoding it loads values labels.
I tested it now.

@Mazi: If removing the UTF switch in the SPSS syntax is solving the issue, I don't see the LimeSurvey issue part here.

stvm_36

stvm_36

2019-06-26 17:51

reporter   ~52571

What is the error?
->>>> Answer

It simply does not generate Syntax and does not give error.
It was meant to hurt a Syntax for the V9 question
VARIABLE LABELS V9 "Sexo".
And then
VALUE LABELS V9
1 "Masculino"
2 "Feminino".

It does not put in Syntax
VALUE LABELS V9
1 "Masculino"
2 "Feminino".

This for all unic answer questions It does not put in Syntax VALUE LABELS

stvm_36

stvm_36

2019-06-26 19:18

reporter   ~52575

For single answer questions it does not generate labels >>>> VALUES LABELS in SYNTAX

VALUE LABELS V8
1 "Sim".
VALUE LABELS V9
1 "Masculino"
2 "Feminino".
VALUE LABELS V10
1 "Menos de 25 anos"
2 "De 26 a 35 anos"
3 "De 36 anos ou +".
VALUE LABELS V11
1 "Até o Ensino Fundamental"
2 "Ensino Médio"
3 "Ensino Superior".

stvm_36

stvm_36

2019-06-26 22:08

reporter   ~52576

----->>>>> * Variable name was incorrect and was changed from to q_ .

VARIABLE LABELS V6 "Sexo".
*Define Value labels.
VALUE LABELS V6
1 "Masculino"
2 "Feminino".
RENAME VARIABLE ( V1 = id ).
RENAME VARIABLE ( V2 = submitdate ).
RENAME VARIABLE ( V3 = lastpage ).
RENAME VARIABLE ( V4 = startlanguage ).

  • Variable name was incorrect and was changed from to q .
    RENAME VARIABLE ( V5 = q
    ).
    RENAME VARIABLE ( V6 = q1 ).
    RESTORE LOCALE.
jelo

jelo

2019-06-27 00:15

partner   ~52577

Statement B: It simply does not generate Syntax and does not give error.
Statement A: The problem is the UTF 8 comm. If you save the SYNATX with local encoding it loads values labels.
Cannot be both true at the same time.

Without the corresponding LSS-export and the unmodified Syntaxfile I see no chance to narrow the issue.

The attached syntaxfile shows that V6 is the send date. (e.g. RENAME VARIABLE ( V6 = sent ).)

You post: "VALUE LABELS V6
1 "Masculino"
2 "Feminino".

And you post "RENAME VARIABLE ( V6 = q1 )".

Provide the LSS export and the unmodified Syntaxfile.
To me it looks like a questioncode inside the LSS is buggy. If underscores are used, it can become messy.

Note: The question code must be unique across the same survey, must start with a letter, and can only contain alphanumeric characters. If you ever try to export your data to SPSS or R, you will discover that the "qcode" becomes the value label, so you have to make the code unique.

stvm_36

stvm_36

2019-06-27 01:07

reporter   ~52578

All questions have unique codes.
The same questionnaire in version 3.17.6 + 190624 does not give error.

stvm_36

stvm_36

2019-06-27 01:35

reporter   ~52579

I made a questionnaire with a single question of the single answer type. It's a problem.


All the questionnaires here are within the standards. It has no error.

jelo

jelo

2019-06-27 01:38

partner   ~52580

I will wait till I see the LSS export and the unmodified SPSS syntax. Since I'm only a simple user of LS, I have time and no obligation.

stvm_36

stvm_36

2019-06-27 05:04

reporter   ~52582

Sorry
I didn't understand very well. My English is not good.
Follow LSS file and syntax

survey_321175_SPSS_syntax_file.sps (1,568 bytes)   
*$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
 /TYPE=TXT
 /FILE='survey_321175_SPSS_data_file.dat'
 /DELCASE=LINE
 /DELIMITERS=","
 /QUALIFIER="'"
 /ARRANGEMENT=DELIMITED
 /FIRSTCASE=1
 /IMPORTCASE=ALL
 /VARIABLES=
 V1 F7
 V2 DATETIME23.2
 V3 F7
 V4 A20
 V5 A31
 V6 F1
 V7 F1
 V8 F1
 V9 F1
 V10 F1
 V11 F1
 V12 F1.
CACHE.
EXECUTE.
*Define Variable Properties.
VARIABLE LABELS V1 "id".
VARIABLE LABELS V2 "submitdate".
VARIABLE LABELS V3 "lastpage".
VARIABLE LABELS V4 "startlanguage".
VARIABLE LABELS V5 "Semente".
VARIABLE LABELS V6 "Sexo".
VARIABLE LABELS V7 "Escolaridade".
VARIABLE LABELS V8 "[Tipo 1] Produtos".
VARIABLE LABELS V9 "[Tipo 2 ] Produtos".
VARIABLE LABELS V10 "[Tipo 3] Produtos".
VARIABLE LABELS V11 "[Tipo 4] Produtos".
VARIABLE LABELS V12 "[Tipo 5] Produtos".
*Define Value labels.
VALUE LABELS  V8
 1 "Sim"
 0 "Não selecionado".
VALUE LABELS  V9
 1 "Sim"
 0 "Não selecionado".
VALUE LABELS  V10
 1 "Sim"
 0 "Não selecionado".
VALUE LABELS  V11
 1 "Sim"
 0 "Não selecionado".
VALUE LABELS  V12
 1 "Sim"
 0 "Não selecionado".
RENAME VARIABLE ( V1 = id ).
RENAME VARIABLE ( V2 = submitdate ).
RENAME VARIABLE ( V3 = lastpage ).
RENAME VARIABLE ( V4 = startlanguage ).
* Variable name was incorrect and was changed from  to q_ .
RENAME VARIABLE ( V5 = q_ ).
RENAME VARIABLE ( V6 = p1 ).
RENAME VARIABLE ( V7 = p2 ).
RENAME VARIABLE ( V8 = p3_1 ).
RENAME VARIABLE ( V9 = p3_2 ).
RENAME VARIABLE ( V10 = p3_3 ).
RENAME VARIABLE ( V11 = p3_4 ).
RENAME VARIABLE ( V12 = p3_5 ).
RESTORE LOCALE.
f_funke

f_funke

2019-06-27 08:49

developer   ~52583

Sorry, I cannot replicate your problem. After importing and activating your survey "limesurvey_survey_321175.lss" and dowloading the SPSS syntax there are VALUE LABELS commands.

And even in the syntax you uploaded yourself ("survey_321175_SPSS_syntax_file.sps"), you find in lines 43 ff.:

*Define Value labels.
VALUE LABELS V8
1 "Sim"
0 "Não selecionado".
VALUE LABELS V9
1 "Sim"
0 "Não selecionado".
VALUE LABELS V10
1 "Sim"
0 "Não selecionado".
VALUE LABELS V11
1 "Sim"
0 "Não selecionado".
VALUE LABELS V12
1 "Sim"
0 "Não selecionado".

So there are value labels. However, I see in the syntax you uploaded 2019-06-25 18:34 there is no VALUE LABELS command.

To better understand your problem it would be good if you uploaded your complete original survey.

stvm_36

stvm_36

2019-06-27 10:46

reporter   ~52584

Does not load value labels for unique questions. Only multiples questions are generated
Look at this other research.

VARIABLE LABELS V6 "Sexo".
VARIABLE LABELS V7 "Escolaridade".
Values Labels Not charged

survey_751195_SPSS_syntax_file.sps (920 bytes)   
*$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
 /TYPE=TXT
 /FILE='survey_751195_SPSS_data_file.dat'
 /DELCASE=LINE
 /DELIMITERS=","
 /QUALIFIER="'"
 /ARRANGEMENT=DELIMITED
 /FIRSTCASE=1
 /IMPORTCASE=ALL
 /VARIABLES=
 V1 F7
 V2 DATETIME23.2
 V3 F7
 V4 A20
 V5 A31
 V6 F1
 V7 F1.
CACHE.
EXECUTE.
*Define Variable Properties.
VARIABLE LABELS V1 "id".
VARIABLE LABELS V2 "submitdate".
VARIABLE LABELS V3 "lastpage".
VARIABLE LABELS V4 "startlanguage".
VARIABLE LABELS V5 "Semente".
VARIABLE LABELS V6 "Sexo".
VARIABLE LABELS V7 "Escolaridade".
*Define Value labels.
RENAME VARIABLE ( V1 = id ).
RENAME VARIABLE ( V2 = submitdate ).
RENAME VARIABLE ( V3 = lastpage ).
RENAME VARIABLE ( V4 = startlanguage ).
* Variable name was incorrect and was changed from  to q_ .
RENAME VARIABLE ( V5 = q_ ).
RENAME VARIABLE ( V6 = p1 ).
RENAME VARIABLE ( V7 = p2 ).
RESTORE LOCALE.
stvm_36

stvm_36

2019-06-27 11:25

reporter   ~52586

Does not load value labels for unique questions.

$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
/TYPE=TXT
/FILE='survey_751195_SPSS_data_file.dat'
/DELCASE=LINE
/DELIMITERS=","
/QUALIFIER="'"
/ARRANGEMENT=DELIMITED
/FIRSTCASE=1
/IMPORTCASE=ALL
/VARIABLES=
V1 F7
V2 DATETIME23.2
V3 F7
V4 A20
V5 A31
V6 F1
V7 F1.
CACHE.
EXECUTE.
Define Variable Properties.
VARIABLE LABELS V1 "id".
VARIABLE LABELS V2 "submitdate".
VARIABLE LABELS V3 "lastpage".
VARIABLE LABELS V4 "startlanguage".
VARIABLE LABELS V5 "Semente".
VARIABLE LABELS V6 "Sexo".
VARIABLE LABELS V7 "Escolaridade".
*Define Value labels.
RENAME VARIABLE ( V1 = id ).
RENAME VARIABLE ( V2 = submitdate ).
RENAME VARIABLE ( V3 = lastpage ).
RENAME VARIABLE ( V4 = startlanguage ).

  • Variable name was incorrect and was changed from to q .
    RENAME VARIABLE ( V5 = q
    ).
    RENAME VARIABLE ( V6 = p1 ).
    RENAME VARIABLE ( V7 = p2 ).
    RESTORE LOCALE.
survey_751195_SPSS_syntax_file-2.sps (920 bytes)   
*$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
 /TYPE=TXT
 /FILE='survey_751195_SPSS_data_file.dat'
 /DELCASE=LINE
 /DELIMITERS=","
 /QUALIFIER="'"
 /ARRANGEMENT=DELIMITED
 /FIRSTCASE=1
 /IMPORTCASE=ALL
 /VARIABLES=
 V1 F7
 V2 DATETIME23.2
 V3 F7
 V4 A20
 V5 A31
 V6 F1
 V7 F1.
CACHE.
EXECUTE.
*Define Variable Properties.
VARIABLE LABELS V1 "id".
VARIABLE LABELS V2 "submitdate".
VARIABLE LABELS V3 "lastpage".
VARIABLE LABELS V4 "startlanguage".
VARIABLE LABELS V5 "Semente".
VARIABLE LABELS V6 "Sexo".
VARIABLE LABELS V7 "Escolaridade".
*Define Value labels.
RENAME VARIABLE ( V1 = id ).
RENAME VARIABLE ( V2 = submitdate ).
RENAME VARIABLE ( V3 = lastpage ).
RENAME VARIABLE ( V4 = startlanguage ).
* Variable name was incorrect and was changed from  to q_ .
RENAME VARIABLE ( V5 = q_ ).
RENAME VARIABLE ( V6 = p1 ).
RENAME VARIABLE ( V7 = p2 ).
RESTORE LOCALE.
f_funke

f_funke

2019-06-27 15:18

developer   ~52590

Using "limesurvey_survey_751195.lss" I could replicate the problem. Indeed the VALUE LABELS syntax is completely missing for single choice questions. I took a closer look at the survey.

Among other things I tested the following:
A) Exported your questions (changed the language from "pt-BR" to "en") and imported them into another survey: SPSS syntax is generated correctly
B) Imported an existing question (that produced correct SPSS syntax, changed language from "en" to "pt-BR") in your survey: no VALUE LABELS syntax generated
C) I did a new survey in Portugese (Brazilian) with just a single question type single choice (radio): no VALUE LABELS syntax generated

So the problem is somewhat related to the original language.

As workaround to get the SPSS syntax, you could

  • export all single choice questions (.LSQ),
  • open each question with a text editor (e.g. the free Notepad++),
  • change the language everywhere in each file from "pt-BR" to "en"
  • create in LimeSurvey a new survey in English
  • import all questions
  • activate the survey
  • generate the SPSS Syntax
  • copy all VALUE LABELS command and past them in your original SPSS syntax.

I have to admit that this is not very convenient, but it help to continue with your work at least.

I changed this bugs status to confirmed and keep my fingers crossed that it is soon fixed.

jelo

jelo

2019-06-27 16:12

partner   ~52591

@f_funke: Which version of LS was used to generate the Syntaxfile? Attach the SPSS syntax file you got.
We are talking about the attachment "limesurvey_survey_751195.lss" from https://bugs.limesurvey.org/view.php?id=15001#c52584

To get the correct syntax with buggy LimeSurvey versions (3.17.7 shows the issue, 3.17.3 is fine) you can copy the survey and add english as a second language. When exporting the syntax, select English.

stvm_36

stvm_36

2019-06-27 19:48

reporter   ~52603

That's not convenient.
I'm exporting the search and importing by version 3.17.3 + 190429.
Using version 3.17.3 + 190429 Gero The syntax correctly.
Now, from here forward all sytaxes generated by updated vesoes will have wrong synatx!
That's the problem!!!! You're going to get a big mistake

stvm_36

stvm_36

2019-06-27 20:02

reporter   ~52604

I'm actually using it from here to the 3.17.3 + 190429 version.
And that's what all IBM SPSS users will have to do.
After all, the syntax will have an error in newer LimeSurvey Versions.

stvm_36

stvm_36

2019-06-27 20:15

reporter   ~52605

I used the version 3.17.7 + 190627

To generate the syntax. It makes a mistake.

jelo

jelo

2019-06-27 20:50

partner   ~52606

If I write "@f_funke" I' m asking f_funke. Not you ;-)

I already state that 3.17.7 is having the same issue.
Developers have to check 3.17.4. or 3.17.5. for change.

As I wrote my workaround: Adding English as an second language will allow to generate the correct SPSS syntax via English SPSS syntax.

stvm_37

stvm_37

2019-06-27 21:15

reporter   ~52607

The export solution at https://bugs.limesurvey.org/view.php?id=15001#c52591
It worked.
Thank you very much!

f_funke

f_funke

2019-06-28 10:02

developer   ~52611

@jelo: I used the LSS you mention and tested with LS 3.17.7. The buggy syntax looks exactly like the complete syntax but the VALUE LABELS command for single choice (radio) is completely missing.

I also tested the issue with 3.17.7 in Afrikaans, English, German, and Spanish and SPSS syntax was generated without a problem.
I also tested with LS 4.0.0-beta but could not replicate the issue.

To sum it up:

  • LS 3.17.6 and LS 3.17.7: SPSS syntax export is in Portugese (Brazilian, pt-BR) without labels for single choice (radio)
  • LS 3.17.4 and LS 3.17.5 might also be affected
  • no other languages seem to be affected
  • LS 3.17.3 and LS 4.0.0-beta work fine

Workaround by @jelo to get the complete syntax:
"copy the survey and add english as a second language. When exporting the syntax, select English."

f_funke

f_funke

2019-06-28 10:39

developer   ~52613

Also Italian (informal) is affected.

f_funke

f_funke

2019-06-28 12:21

developer   ~52617

The bug has been found and will be fixed in the next release. On LimeSurvey Professional the bug is already fixed, so if you might go there to generate your SPSS syntax.

c_schmitz

c_schmitz

2019-06-28 12:27

administrator   ~52618

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=28994

jelo

jelo

2019-06-28 12:28

partner   ~52642

https://github.com/LimeSurvey/LimeSurvey/commit/c72d2e0fcd89c9cdbfc2c6fe906245172941db62

Related Changesets

LimeSurvey: master c72d2e0f

2019-06-28 11:54:08

c_schmitz

Details Diff
Fixed issue 15001: Values Labels for single-answer questions are missing in SPSS export Affected Issues
15001
mod - application/helpers/export_helper.php Diff File

Issue History

Date Modified Username Field Change
2019-06-24 21:01 stvm_36 New Issue
2019-06-25 09:02 Mazi Note Added: 52522
2019-06-25 09:02 Mazi Note Edited: 52522
2019-06-25 11:17 cdorin Note Added: 52528
2019-06-25 13:49 f_funke Note Added: 52542
2019-06-25 15:50 stvm_36 Note Added: 52546
2019-06-25 16:14 f_funke Note Added: 52548
2019-06-25 17:20 jelo Note Added: 52550
2019-06-25 18:19 stvm_36 File Added: survey_54159_SPSS_data_file.dat
2019-06-25 18:19 stvm_36 File Added: survey_54159_SPSS_syntax_file.sps
2019-06-25 18:22 stvm_36 File Added: survey_54159_SPSS_data_file-2.dat
2019-06-25 18:22 stvm_36 File Added: survey_54159_SPSS_syntax_file-2.sps
2019-06-25 18:22 stvm_36 Note Added: 52553
2019-06-25 18:22 stvm_36 File Deleted: survey_54159_SPSS_data_file.dat
2019-06-25 18:22 stvm_36 File Deleted: survey_54159_SPSS_syntax_file.sps
2019-06-25 18:29 stvm_36 Note Added: 52554
2019-06-25 18:32 stvm_36 File Deleted: survey_54159_SPSS_data_file-2.dat
2019-06-25 18:32 stvm_36 File Deleted: survey_54159_SPSS_syntax_file-2.sps
2019-06-25 18:34 stvm_36 File Added: survey_63237_SPSS_data_file.dat
2019-06-25 18:34 stvm_36 File Added: survey_63237_SPSS_syntax_file.sps
2019-06-25 18:34 stvm_36 Note Added: 52555
2019-06-26 08:29 f_funke Note Added: 52557
2019-06-26 08:47 jelo Note Added: 52558
2019-06-26 08:48 f_funke File Deleted: survey_63237_SPSS_data_file.dat
2019-06-26 08:50 f_funke Note Added: 52559
2019-06-26 11:49 stvm_36 File Added: survey_63237_SPSS_data_file.dat
2019-06-26 11:49 stvm_36 File Added: survey_63237_SPSS_syntax_file-2.sps
2019-06-26 11:49 stvm_36 Note Added: 52561
2019-06-26 11:55 f_funke File Deleted: survey_63237_SPSS_data_file.dat
2019-06-26 12:02 f_funke Note Added: 52562
2019-06-26 12:06 jelo Note Added: 52563
2019-06-26 15:56 stvm_36 Note Added: 52567
2019-06-26 16:09 stvm_36 Note Added: 52568
2019-06-26 16:10 stvm_36 Note Added: 52569
2019-06-26 16:35 jelo Note Added: 52570
2019-06-26 17:51 stvm_36 Note Added: 52571
2019-06-26 19:18 stvm_36 Note Added: 52575
2019-06-26 22:08 stvm_36 Note Added: 52576
2019-06-27 00:15 jelo Note Added: 52577
2019-06-27 01:07 stvm_36 Note Added: 52578
2019-06-27 01:35 stvm_36 Note Added: 52579
2019-06-27 01:38 jelo Note Added: 52580
2019-06-27 05:04 stvm_36 File Added: survey_321175_SPSS_syntax_file.sps
2019-06-27 05:04 stvm_36 File Added: limesurvey_survey_321175.lss
2019-06-27 05:04 stvm_36 Note Added: 52582
2019-06-27 08:49 f_funke Note Added: 52583
2019-06-27 10:46 stvm_36 File Added: limesurvey_survey_751195.lss
2019-06-27 10:46 stvm_36 File Added: survey_751195_SPSS_syntax_file.sps
2019-06-27 10:46 stvm_36 Note Added: 52584
2019-06-27 11:25 stvm_36 File Added: survey_751195_SPSS_syntax_file-2.sps
2019-06-27 11:25 stvm_36 File Added: limesurvey_survey_751195-2.lss
2019-06-27 11:25 stvm_36 Note Added: 52586
2019-06-27 15:18 f_funke Note Added: 52590
2019-06-27 16:12 jelo Note Added: 52591
2019-06-27 19:48 stvm_36 Note Added: 52603
2019-06-27 20:02 stvm_36 Note Added: 52604
2019-06-27 20:15 stvm_36 Note Added: 52605
2019-06-27 20:50 jelo Note Added: 52606
2019-06-27 21:15 stvm_37 Note Added: 52607
2019-06-28 10:02 f_funke Note Added: 52611
2019-06-28 10:39 f_funke Note Added: 52613
2019-06-28 10:40 f_funke Status new => confirmed
2019-06-28 10:41 f_funke Priority none => high
2019-06-28 12:21 f_funke Note Added: 52617
2019-06-28 12:27 c_schmitz Changeset attached => LimeSurvey master c72d2e0f
2019-06-28 12:27 c_schmitz Note Added: 52618
2019-06-28 12:27 c_schmitz Assigned To => c_schmitz
2019-06-28 12:27 c_schmitz Resolution open => fixed
2019-06-28 12:28 jelo Note Added: 52642
2019-06-28 12:33 c_schmitz Status confirmed => resolved
2019-06-28 12:33 c_schmitz Fixed in Version => 3.17.x
2020-03-02 16:57 c_schmitz Status resolved => closed
2020-03-02 16:57 c_schmitz Fixed in Version 3.17.x => 3.19.2