Closed ghost closed 9 years ago
Added a simple trim already. @richardbank , could you send me an example document, so I can test quickly?
Attached .csv-file changes Strong Hand and Weak hand values for 2 glosses: wesseltest and wesseltest3. Signbank contains handshape '#B' for wesseltest, and 'None' for wesseltest3. The .csv-file attempts to change the Strong Hand values into '#B ' (with a space), and the Weak Hand values into '#B' (only applicable to wesseltest3). The outcome should be that only wesseltest3 will be changed, and that both resulting Strong and Weak hand values are '#B'.
(Github apparently doesn't support the uploading of .csv-files, so I renamed to .txt)
On 2-10-2015 17:13, Wessel Stoop wrote:
Added a simple trim already. @richardbank https://github.com/richardbank , could you send me an example document, so I can quickly test?
— Reply to this email directly or view it on GitHub https://github.com/Woseseltops/signbank/issues/95#issuecomment-145057083.
I tested myself already, but I get an AttributeError at /signs/import_csv/: 'str' object has no attribute 'trim'.
Hasty rush is rarely good :) . I fixed the trim problem (should be 'strip' in Python)!
:-)
It indeed now shows the behavior Richard described:
For wesseltest (3117), Weak Hand changes from None (None) to #B (90). For wesseltest (3117), Strong Hand changes from None (None) to #B (90).
I added the gloss number (3117) that it indeed is wesseltest3. The missing 3 is caused by the fact that I was playing with changing the idfield, for another issue.
Currently, when importing a CSV with the Import CSV function, data is imported 'as is'. For example, the existing value '#B' is seen as different from the imported value '#B ' (with a trailing space). Please strip trailing spaces from the imported data.