dosubot[bot] commented on issue #7957: URL: https://github.com/apache/incubator-devlake/issues/7957#issuecomment-2310017331
<!-- Answer --> The team configuration fails to update using the API, resulting in a 500 internal error and not populating the `teams`, `users`, and `team_users` tables in MySQL when uploading CSV files with cURL or Postman because the CSV files might not be saved with UTF-8 encoding. The documentation specifies that if you are using Excel to modify the CSV file, it must be saved with UTF-8 encoding. Additionally, ensure that the column headers and file suffix are not modified when filling out the CSV files. The API expects specific formats and headers to correctly process and populate the tables. Supporting evidence from the document: > "Fill out `teams.csv` file and upload it to DevLake (If you are using Excel to modify the CSV file, please save it with UTF-8 encoding. See [how](https://answers.microsoft.com/en-us/msoffice/forum/all/how-can-i-save-a-csv-with-utf-8-encoding-using/12801501-c1e4-4a64-80d9-96b680b64cfe))" > "Fill out `users.csv` and upload it to DevLake (If you are using Excel to modify the CSV file, please save it with UTF-8 encoding. See [how](https://answers.microsoft.com/en-us/msoffice/forum/all/how-can-i-save-a-csv-with-utf-8-encoding-using/12801501-c1e4-4a64-80d9-96b680b64cfe))" > "Fill out `users.csv` with your org data. Please do not modify the column headers or the file suffix." Moreover, ensure that you are following the correct steps to upload the CSV files: 1. **Create the `teams` table**: - Download the template `teams.csv` file. - Fill out the `teams.csv` file with your organization data. - Upload the `teams.csv` file using the provided cURL command. 2. **Create the `users` and `team_users` tables**: - Download the template `users.csv` file. - Fill out the `users.csv` file with your organization data. - Upload the `users.csv` file using the provided cURL command. Ensure that the CSV files are saved with UTF-8 encoding and that the column headers and file suffix are not modified before uploading them. Additionally, verify that you are using the correct API endpoints and following the step-by-step guide provided in the documentation: 1. **Create the `teams` table**: - Download the template `teams.csv` file using: ``` curl --location --request GET 'http://127.0.0.1:4000/api/plugins/org/teams.csv?fake_data=true' ``` - Upload the `teams.csv` file using: ``` curl --location --request PUT 'http://127.0.0.1:4000/api/plugins/org/teams.csv' --form 'file=@"/path/to/teams.csv"' ``` 2. **Create the `users` and `team_users` tables**: - Download the template `users.csv` file using: ``` curl --location --request GET 'http://127.0.0.1:4000/api/plugins/org/users.csv?fake_data=true' ``` - Upload the `users.csv` file using: ``` curl --location --request PUT 'http://127.0.0.1:4000/api/plugins/org/users.csv' --form 'file=@"/path/to/users.csv"' ``` Following these steps and ensuring the correct file formats should help resolve the 500 internal error and successfully populate the `teams`, `users`, and `team_users` tables. Additionally, ensure that the `accounts` table is populated via data collection and that the heuristic algorithm is run to populate the `user_accounts` table, as outlined in the documentation <sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Configuration/TeamConfiguration.md)</sup><sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/Configuration/TeamConfiguration.md)</sup><sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.19/Configuration/TeamConfiguration.md)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.20/Configuration/TeamConfiguration.md)</sup><sup>[[5]](https://github.com/apache/incubator-devlake-website/blob/main/versio ned_docs/version-v0.15/UserManuals/TeamConfiguration.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
