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.

139 lines
5.5 KiB

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