You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
5.7 KiB

4 years ago
4 years ago
4 years ago
  1. # FAQ
  2. ## How to create a user
  3. To create a new doccano user:
  4. 1. Run the doccano webserver.
  5. 2. Log in to the admin site (in the case of pip installation) via <http://localhost:{port}/admin/>.
  6. The example below uses the port `8000` and username `admin`. If you set your own port or username and password on running the server, use those values to log in.
  7. ![](images/faq/user_creation/login.png)
  8. 3. After logging in to the admin site, click **Users**:
  9. ![](images/faq/user_creation/select_users.png)
  10. 4. Click the **ADD USER** button in the upper right corner:
  11. ![](images/faq/user_creation/select_add_user.png)
  12. 5. After entering the username and password for the new user, click **SAVE**:
  13. ![](images/faq/user_creation/create_user.png)
  14. Congratulations. Now you can log in to doccano as a new user. After logging out of the admin site, try logging in to doccano as a new user.
  15. ## How to add a user to your project
  16. **Note**: You must be the administrator of the project to add new users to it. These instructions also assume that you have already created a new user. See [How to create a user](#how-to-create-a-user) above.
  17. To add a user to your project:
  18. 1. Log in to doccano.
  19. 2. Click on your project.
  20. 3. From the left side menu, click **Members**. If you are not the administrator of the project, **Members** will not appear.
  21. ![](images/faq/add_annotator/select_members.png)
  22. 4. Click **Add** and fill in the Add Member form with the user name and role you want to add to the project.
  23. 5. Click **Save**.
  24. ![](images/faq/add_annotator/select_user.png)
  25. Now the new user can access the project.
  26. ## How to change the password
  27. To change a user's password:
  28. 1. Run the doccano webserver.
  29. 2. Log in to the admin site (in the case of pip installation) via <http://localhost:{port}/admin/>.
  30. **Note**: You need to have a staff permission to log in to the admin site. If you don't have the right permissions, ask the administrator to change your password.
  31. ![](images/faq/user_creation/login.png)
  32. 3. Click **Users**.
  33. ![](images/faq/user_creation/select_users.png)
  34. 4. Click on the name of the user whose password you want to change:
  35. ![](images/faq/how_to_change_password/user_list.png)
  36. 5. Click the link that says **this form** in the password section.
  37. ![](images/faq/how_to_change_password/user_page.png)
  38. 6. Fill out the form and change the password.
  39. ![](images/faq/how_to_change_password/change_password.png)
  40. ## I can't upload my data
  41. To troubleshoot, review this list:
  42. - File encoding: `UTF-8` is appropriate.
  43. - Filename: alphabetic file name is suitable.
  44. - File format selection: file format radio button should be selected properly.
  45. - When you are using JSON/JSONL: Confirm JSON data is valid.
  46. - You can use [JSONLint](https://jsonlint.com/) or some other tool (when JSONL, pick one data and check it).
  47. - When you are using CSV: Confirm CSV data is valid.
  48. - You can use Excel or some tools that have import CSV feature.
  49. - Lack of line: Data file should not contain blank line.
  50. - Lack of field: Data file should not contain blank field.
  51. **You don't need your real complete data to validate the file format. The picked data and masked data is suitable if your data is large or secret.**
  52. ## I want to change the port number
  53. In the case of Docker Compose, you can change the port number by editing `docker-compose.prod.yml`.
  54. 1. Change `80:8080` to `<your_port>:8080` in `nginx`/`ports` section as follows:
  55. ```yaml
  56. nginx:
  57. image: doccano/doccano:frontend
  58. ports:
  59. - <your_port>:8080
  60. ```
  61. 2. Add the `CSRF_TRUSTED_ORIGINS` environment variable to the `backend`/`environment` section as follows:
  62. ```yaml
  63. backend:
  64. image: doccano/doccano:backend
  65. environment:
  66. ...
  67. DJANGO_SETTINGS_MODULE: "config.settings.production"
  68. CSRF_TRUSTED_ORIGINS: "http://127.0.0.1:<your_port>"
  69. ```
  70. ## I want to update to the latest doccano image
  71. 1. Execute `git pull` to reflect the latest doccano.
  72. 2. Delete the volume that `doccano_node_modules`, `doccano_static_volume`, `doccano_venv` and `doccano_www`.
  73. **Do not delete `doccano_postgres_data` because it stores your projects data.**
  74. 3. Rebuild the doccano image.
  75. The following commands are the procedure for 2~3.
  76. ```bash
  77. ❯ docker volume ls
  78. DRIVER VOLUME NAME
  79. local doccano_node_modules
  80. local doccano_postgres_data
  81. local doccano_static_volume
  82. local doccano_venv
  83. local doccano_www
  84. ❯ docker volume rm doccano_node_modules doccano_static_volume doccano_venv doccano_www
  85. ❯ docker-compose -f docker-compose.prod.yml build --no-cache
  86. ```
  87. ## django.db.utils.OperationalError: no such function: JSON_VALID
  88. doccano uses JSONField on SQLite. So you need to enable the JSON1 extension on Python's sqlite3 library. If the extension is not enabled on your installation, a system error will be raised. This is especially related to the user who uses macOS and Python which is less than 3.7, Windows and Python which is less than 3.9.
  89. If you have this problem, try [enabling JSON1 extension on SQLite](https://code.djangoproject.com/wiki/JSON1Extension).
  90. ## CSRF failed
  91. If you have this problem, set the `CSRF_TRUSTED_ORIGINS` environment variable to your domain name. For example, if your domain name is `example.com`, set `CSRF_TRUSTED_ORIGINS=example.com`. In the debug mode, the default value is `http://127.0.0.1:3000`, `http://0.0.0.0:3000`, and `http://localhost:3000`. If you are using Docker Compose, set `CSRF_TRUSTED_ORIGINS` in `docker-compose.prod.yml`:
  92. ```yaml
  93. backend:
  94. image: doccano/doccano:backend
  95. environment:
  96. ...
  97. DJANGO_SETTINGS_MODULE: "config.settings.production"
  98. CSRF_TRUSTED_ORIGINS: "http://192.168.10.3:3000"
  99. ```