bugPSPP - Bugs: bug #41475, underscores in variable names...

 
 

bug #41475: underscores in variable names break import with 'duplicate variable name' error

Submitted by:  None
Submitted on:  Wed 05 Feb 2014 11:32:00 PM UTC  
 
Category: System/Portable File I/OSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 08 Feb 2014 04:57:33 PM UTC, comment #2:

> I think I'll look at making the system file reader tolerate duplicate names in general, which would also handle this corner case.


Done.

Ben Pfaff <blp>
Project Administrator
Sat 08 Feb 2014 04:25:25 PM UTC, comment #1:

This is really odd. The file definitely has two variables with the name SLNB_12, as pspp-dump-sav shows. When I modify the system file reader to just rename variables with duplicate names, the renaming involved in building up the long string variables eliminates the duplicate names, so that no variable with the name that is duplicated shows up.

I think I'll look at making the system file reader tolerate duplicate names in general, which would also handle this corner case.

Ben Pfaff <blp>
Project Administrator
Wed 05 Feb 2014 11:32:00 PM UTC, original submission:

The bug I ran into is probably similar to this old email on the mailinglist:

http://lists.gnu.org/archive/html/pspp-users/2013-04/msg00049.html

I have a .sav file that has a few variables with very similar names including underscores in the name. SPSS opens the file fine, but PSPP breaks with an error: Duplicate variable name.

I'm attaching a file with a few variables of type string with a wifth of > 700 characters. Trying to reproduce the bug, the width of the variable seems to be the culprit, since I've tried changing the widths to lower values and there was no issue.

The issue seems to be related to the way long string variables are broken up and stored internally. I assume this is done via a stem and an appended integer separated by an underscore. When the original variable name already includes a combination of stem and integer separated by an underscore, the I/O process breaks on import with a 'duplicate variable name' error.

This was confirmed on OS X 10.8.4 in

pspp --version
pspp (GNU PSPP) 0.8.1
Packaged by snc (0.8.1)

and on Ubuntu 12.04 in
pspp --version
pspp (GNU PSPP) 0.7.9

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #30468:  testfile.sav added by None (71kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by blp (Posted a comment)
  • -unavailable- added by steffenweiss
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 08 Feb 2014 04:57:33 PM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 05 Feb 2014 11:41:11 PM UTCsteffenweissCarbon-Copy-=>Added steffenweiss
    Wed 05 Feb 2014 11:32:00 PM UTCNoneAttached File-=>Added testfile.sav, #30468

    Back to the top


    Powered by Savane 3.1-cleanup