Skip to content

addusers causes error using CSV file with UTF-8(with BOM)  #199

Description

@jacalata

tabcmd-windows.exe (2.06) addusers causes error using CSV file with UTF-8(with BOM)

[Repro Steps]

  1. Create a Group with any name on TS/TC (e.g. TestGroup)
  2. Create CSV file with username that are already on TS/TC (e.g. user1,user2,user3).
  3. Save the CSV file as UTF-8(with BOM) encoding. (e.g. bom.csv)
  4. Run tabcmd-windows.exe like below.

    tabcmd-windows.exe login -s http://hostname -u admin -p password
    tabcmd-windows.exe addusers "TestGroup" --users "bom.csv"
    It failed with following error.

In tabcmd.log , you can see that the first username was recognized with "\ufeff".

Adding users listed in D:\Jerry_1474199_tabcmd\testcase\bom.csv to TestGroup...
Querying all groups on site
Querying all users on site
Querying all users on site
Added user (id: 95bd75a5-4319-445f-9b1d-5d13724cd8ee) to group (ID: 43aa323f-47ba-4a53-ad76-3d07d583f5be)
Successfully added user2 for group <tableauserverclient.models.group_item.GroupItem object at 0x000001DCCB53DD30>
Querying all users on site
Added user (id: 272778b7-3ec6-4991-b64c-de34894cb07e) to group (ID: 43aa323f-47ba-4a53-ad76-3d07d583f5be)
Successfully added user3 for group <tableauserverclient.models.group_item.GroupItem object at 0x000001DCCB53DD30>
100% complete
Number of errors: 1
Error details:
line 1 for user ''\ufeffuser1'': ''404: Item not found: [Users] \ufeffuser1''

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions