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

 
 

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

Submitter:  None
Submitted:  Wed 05 Feb 2014 11:32:00 PM UTC
   
 
Category:  System/Portable File I/O Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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 Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-08 blp StatusNone Fixed
        Open/ClosedOpen Closed
    2014-02-05 steffenweiss Carbon-Copy- Added steffenweiss
    2014-02-05 None Attached File- Added testfile.sav, #30468

    Back to the top

    Powered by Savane 3.14-0608.
    Corresponding source code